[racket-dev] futures waiting for scheme_make_envunbox

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Aug 25 17:57:36 EDT 2010

At Wed, 25 Aug 2010 08:17:32 -0600, Matthew Flatt wrote:
> There's a `set!' implicit in the `letrec' that is implicit in the use
> of internal definitions. Maybe the Typed Racket optimizations confuse
> the compiler so that it doesn't see how to convert the `let' into a
> `letrec'.

One requirement for converting a `letrec' to a `let' is that the
right-hand side can't capture the current continuation and invoke it
multiple times, because continuations can expose the different times at
which `let' and `letrec' allocate locations for their bindings. That's
the part of the optimizer that was confused by the use of unsafe
operations.

Unsafe operations by themselves aren't confusing, but the optimizer
also tentatively rotates arguments between the unsafe call and a
surrounding `let' to work toward a particular combination that the JIT
prefers. The extra `let' layer (which goes away in the end, in this
case) confused the optimizer's no-`call/cc' test.

The solution was to improve the no-`call/cc' test.



Posted on the dev mailing list.