From 62e18de0a5c3572890bc73ea834b72b6851e3de1 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 2 Mar 2021 20:14:03 -0800 Subject: 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. --- share/txr/stdlib/compiler.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v1.2.3