summaryrefslogtreecommitdiffstats
path: root/stdlib/compiler.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-11-02 07:12:51 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-11-02 07:12:51 -0700
commit02d7e794464f3a27ae66e5cf84816bb6206a9afc (patch)
tree440d73ce1019dd0a817aa566773287c92d8dadd4 /stdlib/compiler.tl
parent9da8f87377dd18af112d985665ec227480185b17 (diff)
downloadtxr-02d7e794464f3a27ae66e5cf84816bb6206a9afc.tar.gz
txr-02d7e794464f3a27ae66e5cf84816bb6206a9afc.tar.bz2
txr-02d7e794464f3a27ae66e5cf84816bb6206a9afc.zip
compiler: bug: invalid transformation of (- x y ...).
* stdlib/compiler.tl (compiler comp-arith-neg-form): Remove algebraically incorrect transformation.
Diffstat (limited to 'stdlib/compiler.tl')
-rw-r--r--stdlib/compiler.tl8
1 files changed, 2 insertions, 6 deletions
diff --git a/stdlib/compiler.tl b/stdlib/compiler.tl
index ae64266b..5330161d 100644
--- a/stdlib/compiler.tl
+++ b/stdlib/compiler.tl
@@ -1265,12 +1265,8 @@
(tree-bind (nop . args) form
(let ((op (caseq nop (- '+) (/ '*)))
(a1 (car args)))
- (if (and (eq nop '-)
- (constantp a1))
- me.(comp-arith-form oreg env
- ^(,op (- ,a1) ,*(cdr args)))
- me.(comp-fun-form oreg env
- ^(,nop ,(car args) (,op ,*(cdr args)))))))
+ me.(comp-fun-form oreg env
+ ^(,nop ,(car args) (,op ,*(cdr args))))))
me.(comp-fun-form oreg env form)))
(defmeth compiler comp-fun-form (me oreg env form)