uncurrying
Stephen Weeks
MLton@research.nj.nec.com
Mon, 13 Sep 1999 13:48:25 -0700 (PDT)
> Ok, but aren't environment already pretty flat?
No. The closure converter produces completely tuplized environments.
The environment is flat, not linked, but is represented by a single
pointer. AHA, now I remember the problem. For a curried function,
the body will have to completely destruct the flat environment and
reconstruct a new one with one more slot, the argument. This will
lead to a lot of code -- possibly too much to get inlined. This has
nothing to do with the flattening optimization and is simply the
output of the closure converter.