summaryrefslogtreecommitdiffstats
path: root/txr.vim
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-05-02 12:46:06 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-05-02 12:46:06 -0700
commitf2f8a4d7738988533bca6687e94b561dd73f5e93 (patch)
treed012bb7d1991efa1dc3f98ed47a0c9fa8e22b2b3 /txr.vim
parent60fd266c43615f60fb4ff9bb1ae2cada08cf1f07 (diff)
downloadtxr-f2f8a4d7738988533bca6687e94b561dd73f5e93.tar.gz
txr-f2f8a4d7738988533bca6687e94b561dd73f5e93.tar.bz2
txr-f2f8a4d7738988533bca6687e94b561dd73f5e93.zip
compiler: treat nested load-time forms.
load-time forms nested in load-time forms have no special semantics; it's wasteful to separately hoist them into load time and store their value in their own D register. We must be careful: this is not true if a nested form occurs in a lambda. * share/txr/stdlib/compiler.tl (*load-time*): New special variable. (compiler comp-lambda): Bind *load-time* to nil around the compilation of the lambda, so load-time forms in the lambda are hoisted to load time, even if the lambda itself is wrapped in a load-time form. (compiler comp-load-time-lit): Bind *load-time* true around the compilation of the form. If *load-time* is already true, then skip the special load-time logic and just compile the enclosed form; the surrounding load-time compilation is taking care of the load-time hoisting. * txr.1: Document that load-time forms nested in load-time forms don't do anything, except in the lambda case.
Diffstat (limited to 'txr.vim')
0 files changed, 0 insertions, 0 deletions