diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-11-01 23:38:56 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-11-01 23:38:56 -0700 |
commit | 7889af8ff0eb30aa4e8657fe336af92abd571b5f (patch) | |
tree | a21aca3595b9dcd556512f4bd2da4fc1b5c6f5ac /tests/008/students.txr | |
parent | 1bf0ffecaf481e70dad272d28ae3a59e063b0fec (diff) | |
download | txr-7889af8ff0eb30aa4e8657fe336af92abd571b5f.tar.gz txr-7889af8ff0eb30aa4e8657fe336af92abd571b5f.tar.bz2 txr-7889af8ff0eb30aa4e8657fe336af92abd571b5f.zip |
compiler: don't lift top-level lambdas.
The compiler is lifting top-level lambdas, such as those
generated by defun, using the load-time mechanism. This has
the undesireable effect of unnecessarily placing the lambdas
into a D register.
* stdlib/compiler.tl (*top-level*): New special variable.
This indicates that the compiler is compiling code that
is outside of any lambda.
(compiler comp-lambda-impl): Bind *top-level* to nil when
compiling lambda, so its interior is no longer at the
top level.
(compiler comp-lambda): Suppress the unnecessary lifting
optimization if the lambda expression is in the top-level,
outside of any other lambda, indicated by *top-level* being
true.
(compile-toplevel): Bind *top-level* to t.
Diffstat (limited to 'tests/008/students.txr')
0 files changed, 0 insertions, 0 deletions