Tue, 14 Sep 1999 12:01:43 -0400
From: "Stephen Weeks" <firstname.lastname@example.org>
Content-Type: text/plain; charset=us-ascii
Date: 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.
Can you elaborate? In particular, I was wondering whether this
would happen in the most common case, namely a curried function
that is always fully applied. In this case, wouldn't the simplifier
running after closure conversion be able to remove the extra