When the runtime thread `touch`es a future that is blocked on an
atomic action (just as JIT compilation), the runtime thread would
eagerly run the action, but still leave the future on the
atomic-action queue. Atomic actions tend to be ok to run a second time
(including JIT compilation), so a problem may not show up immediately,
but a semaphore can get out of sync and cause problems later.
Change `fl->fx` to truncate as it converts, which is typically done
anyway by a machine instruction to convert from floating-point to
integer values. This makes `fl->fx` different from `inexact->exact`
or `fl->exact-integer`, but it brings BC and CS in line.
The comparison was off for 32-bit plaforms, because it didn't allow
fractional increments, The comparison was off for 64-bit platforms,
bbecause it didn't account for round-trip failure when starting from
the largest fixnum.
original commit: 74eb0583ae1b6212fbde459d7486c3d4a0498401
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.