diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-05-03 11:52:21 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-05-03 11:52:21 -0700 |
commit | 799f765f3f1fe18901636c124f1ae62df46f93a8 (patch) | |
tree | be67c4dec9db2ce6b1f987049dd049ff7037614b /chksum.h | |
parent | 898e55a66e8011140257057e4faa52f4cb74648b (diff) | |
download | txr-799f765f3f1fe18901636c124f1ae62df46f93a8.tar.gz txr-799f765f3f1fe18901636c124f1ae62df46f93a8.tar.bz2 txr-799f765f3f1fe18901636c124f1ae62df46f93a8.zip |
compiler: implement lambda lifting.
This is what the recent load-time changes were grooming the
compiler toward. When we compile a lambda, we can look at the
function and variable refernces it is making. If the lambda
makes no lexical function or variable references, we can lift
that lambda into load time, so that it's instantiated once and
then re-used out of a D register. Effectively, it becomes a
top-level function.
* share/txr/stdlib/compiler.tl (compiler comp-lambda-impl):
New method, formed by renaming comp-lambda.
(compiler comp-lambda): Turned not wrapper for comp-lambda
impl which compiles the lambda, and checks for the conditions
for hoisting it into load time, which is currently done by
generating the sys:load-time-lit form around it and re-compiling.
Diffstat (limited to 'chksum.h')
0 files changed, 0 insertions, 0 deletions