diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-11-02 07:12:51 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-11-02 07:12:51 -0700 |
commit | 15e1c259cfe7a961b97cbd4ca3e148f22554e832 (patch) | |
tree | 440d73ce1019dd0a817aa566773287c92d8dadd4 /stdlib | |
parent | 1e11f341609e614c0268c792658c95063a92ac75 (diff) | |
download | txr-15e1c259cfe7a961b97cbd4ca3e148f22554e832.tar.gz txr-15e1c259cfe7a961b97cbd4ca3e148f22554e832.tar.bz2 txr-15e1c259cfe7a961b97cbd4ca3e148f22554e832.zip |
compiler: bug: invalid transformation of (- x y ...).
* stdlib/compiler.tl (compiler comp-arith-neg-form): Remove
algebraically incorrect transformation.
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/compiler.tl | 8 |
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) |