[Ecls-list] One more fix
lisp at arrakis.es
Fri Dec 17 06:32:03 UTC 2004
> Juan Jose Garcia Ripoll <lisp at arrakis.es> writes:
>> * The compiler has a brand new set of data structures for representing
>> * forms, which keep track of where variables are used, parent forms,
>> * etc. These new structures are used to compute whether a function
>> * needs a lexical environment, whether this environment has to be
>> * stack allocated or a list, replacing variables with their values,
>> * etc.
> Does this mean we have stack-allocated closures now (where appropriate)?
Well, the term stack-allocated closures is probably misleading. What the
compiler does is to either create the environment as a list or as an
automatic vector (which some C compilers might allocate in the stack),
depending on wether the children functions will end up becoming full
closures or not.
This was what ECL was always intended to do, and what the compiler always
tried to do. The analysis of when stack-allocation should happen was not
very good -- and I am still working on improving the algorithm. At least
the examples in the misc.lsp file in Paul's test suite now compile without
More information about the ecl-devel