summaryrefslogtreecommitdiffstats
path: root/parser.l
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-05-03 09:11:33 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-05-03 09:11:33 -0700
commit898e55a66e8011140257057e4faa52f4cb74648b (patch)
tree5a3fdc8fa1e626360b8933c2672c90a1929e0c4f /parser.l
parentb64e6bc1e540b5f580c888ea1b6aeaccaf9d6b61 (diff)
downloadtxr-898e55a66e8011140257057e4faa52f4cb74648b.tar.gz
txr-898e55a66e8011140257057e4faa52f4cb74648b.tar.bz2
txr-898e55a66e8011140257057e4faa52f4cb74648b.zip
compiler: honor load-time in parts of loop.
* share/txr/stdlib/compiler.tl (compiler comp-for): If a for loop occurs in the top level, or inside a load-time, then we don't want to suppress the semantics of load-time for any parts of the loop that are repeatedly evaluated. The programmer may be doing that specifically to hoist those calculations out of the loop. We thus bind *load-time* to nil after compiling the initializing and test expressions. * txr.1: New paragraph in Notes for load-time, mentioning compiler treatment of loops and lambda. The language is deliberately general rather than being specifically about the for loop, because several loop constructs compile to the for loop, and that is also subject to future changes.
Diffstat (limited to 'parser.l')
0 files changed, 0 insertions, 0 deletions