summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-03-02 20:14:03 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-03-02 20:14:03 -0800
commit62e18de0a5c3572890bc73ea834b72b6851e3de1 (patch)
tree92589a5ab78918d75e2112723e2ccf5d5369b248
parent9bc3d08d0b21e45f91536dca367b6d1bb2b762a5 (diff)
downloadtxr-62e18de0a5c3572890bc73ea834b72b6851e3de1.tar.gz
txr-62e18de0a5c3572890bc73ea834b72b6851e3de1.tar.bz2
txr-62e18de0a5c3572890bc73ea834b72b6851e3de1.zip
compiler: mistake in (if (equal ...) ..) pattern.
* share/txr/stdlib/compiler.tl (compiler comp-if): An invalid or expression means we are not matching the if over equal strength reduction pattern, and miscompiling an unrelated expression (luckily, one that is unlikely to occur in any reasonable application). Unfortunately, this correction spoils the way the pattern matching Ackermann test case is being compiled.
-rw-r--r--share/txr/stdlib/compiler.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index e624970a..0c90d5ce 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -564,7 +564,7 @@
(defmeth compiler comp-if (me oreg env form)
(match-case (cdr form)
- (@(require ((@(and (or equal nequal) @op) @a @b) . @rest)
+ (@(require ((@(and @(or equal nequal) @op) @a @b) . @rest)
(or (eql-comparable a)
(eql-comparable b)))
(let* ((pos (eq op 'equal))