Follows Chez Scheme and Guile. Turns `(exp 10000.+0.0i)` into
`+inf.0+0.0i` instead of `+inf.0+nan.0i`, which is analagous to
the behavior for exact 0 in the complex part.
Fixes#3194.
Simplify and normalize backend elements for loading, storing, and
converting floating-point numbers, taking better advantage of
new support for floating-pointer registers.
original commit: 4066af9cf3799392ef785a77da69f7cfff74d2fe
This is a follow-up to 276f8da076, where `(%tc-ref cp)` was supposed
to be preserved by moving it into %cp, but intrinisics for bytevector
arguments can kill %cp. Use a temporary to expose things properly to
the register allocator.
original commit: 3a29db06a452e46e69ebcde524b3b9acb435dec3
This reverts commit aa230ac79bed1efa02779bb7bbcde5c009818b74, so it
can be replaced with a solution that is less clumsy and less fragile.
original commit: 533940fdc6905d810deabb457d7004a031a3ac05
This is a follow-up to 276f8da076, where `(%tc-ref cp)` was preserved
by moving into `%cp`, but I missed that intrinisics for string and
bytevector arguments kill `%cp`.
original commit: aa230ac79bed1efa02779bb7bbcde5c009818b74
Fix nested-loop handling with union find, and fix unboxing check
to properly account for a primitive's arity.
original commit: af2f8784d96f09624b97476fb7b674a77097f9d0
Preinfo recoreds were mutated under the incorrect assumption that they
were specific to a `lambda` form, which is not true, especially after
some inlining.
original commit: 489b4c732d7359b1c7c4558d41d5e6ba3a9abafa
If the callback takes too long to run, then a second copy was
scheduled --- which likely schedules a third copy, and so on. This
problem could lead DrRacket to get stuck in a GC cycle, for example.
In Schemify's lifting pass, avoid disturbing loop patterns that Chez
Scheme will recognize. Keeping the loops intact is helpful for
floating-point unboxing, where (currently) unbxoing is supported
across loop iterations but not across function boundaries in general.
The problem especially affects `enable-object-counts`, where mark mode
can update an old rtd instead of a copy that is already made.
original commit: 31e2df63894d39b005c6b9984745b44409198d02
Avoid allocating a flonum object for floating-opint calculations
that are consumed only by other floating-point caculations.
For this first cut, unboxing applies only to fl+, fl-, fl*, fl/,
flabs, fl<, fl<=, fl=, fl>, fl>=, bytevector-ieee-double-[native-]ref,
and bytevector-ieee-double-[native-]set!. Local variables can be
unboxed in the same way as implicit temporaries, and loop arguments
can be unboxed, but values in a closure and function-call arguments
are always boxed.
arm32 support is mostly in place, but not yet right. ppc32 support is
not yet implemented.
This commit includes a small change that is incompatible with previous
Chez Scheme versions: `(fl= +nan.0)` (and similar for other
comparisons) produces true instead of false.
original commit: 36459e43f10705aa3e383376ca7d54cf2998b7ee