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
commit3b320550e041141cd28d51a334bc2b16c90e01c2 (patch)
tree92589a5ab78918d75e2112723e2ccf5d5369b248
parentf70532d9f2e2b51e4d9f878573682672efaf993f (diff)
downloadtxr-3b320550e041141cd28d51a334bc2b16c90e01c2.tar.gz
txr-3b320550e041141cd28d51a334bc2b16c90e01c2.tar.bz2
txr-3b320550e041141cd28d51a334bc2b16c90e01c2.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))