summaryrefslogtreecommitdiffstats
path: root/genvim.txr
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-01-20 07:22:09 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-01-20 07:22:09 -0800
commita92cd39b8c12305a4e7092afe418c6006dbebeb5 (patch)
tree195f6d02ccb835cee9603f89f5182b5445e70414 /genvim.txr
parent9a2f9df335393284f6af2d95dbd65cb606792ad8 (diff)
downloadtxr-a92cd39b8c12305a4e7092afe418c6006dbebeb5.tar.gz
txr-a92cd39b8c12305a4e7092afe418c6006dbebeb5.tar.bz2
txr-a92cd39b8c12305a4e7092afe418c6006dbebeb5.zip
compiler: bug in new and expansion.
* /share/txr/stdlib/compiler.tl (expand-and): The case with @(true-const-p) is wrongly ordered with respect to (and @a). The problem is that @rest can match a null terminator, and then we wrongly consume the constant; i.e. (and 42) calls (expand-and ^(and)) yielding t. Also, we eliminate the (and @a @b) case, because it is redundant with respect to (and @a . @rest). We adjust the latter to just output (if ...). And, lo and behold, now the function's cases map 1:1 to the ones in reduce-or. In fact reduce-or was originally produced from expand-and. I debugged it thoroughly, but neglected to backport to expand-and.
Diffstat (limited to 'genvim.txr')
0 files changed, 0 insertions, 0 deletions