summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-08-07 23:55:34 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-08-07 23:55:34 -0700
commit3b9804840a0c5b6f7a8b852019e90a703a0c018c (patch)
tree14925684be8f8f71f8e72bff5e62bea67c44ea56 /tests
parente99c890b7bdd54dbbb83d25c3e9adb2f95c960c7 (diff)
downloadtxr-3b9804840a0c5b6f7a8b852019e90a703a0c018c.tar.gz
txr-3b9804840a0c5b6f7a8b852019e90a703a0c018c.tar.bz2
txr-3b9804840a0c5b6f7a8b852019e90a703a0c018c.zip
compiler: bugfix: eval order in inline lambda.
* share/txr/stdlib/compiler.tl (lambda-apply-transform): The expander fails to observe left-to-right evaluation because if the trailing argument form is present, it is evaluated first, even though it is the last argument. Also, the argument evaluations are wrongly interleaved among the default expressions for optional arguments; they must be evaluated firt. We fix all this by allocating gensyms for all of the fixed argument forms, and binding these via an extra let wrapped around the output let* form. When generating the let* we refer to the gensyms instead of the original fixed arguments. This extra let needs optimizing, but it can't just be converted to an alet because of scoping issues.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions