1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

fix compile-time bug compiling (+ "foo" " bar")

* module/language/tree-il/primitives.scm (+, -): Avoid calling exact? on
  non-numeric args.
This commit is contained in:
Andy Wingo 2009-09-06 14:13:48 +02:00
parent 56664c089c
commit eebff6d7f1

View file

@ -208,11 +208,11 @@
(x) x
(x y) (if (and (const? y)
(let ((y (const-exp y)))
(and (exact? y) (= y 1))))
(and (number? y) (exact? y) (= y 1))))
(1+ x)
(if (and (const? x)
(let ((x (const-exp x)))
(and (exact? x) (= x 1))))
(and (number? y) (exact? x) (= x 1))))
(1+ y)
(+ x y)))
(x y z . rest) (+ x (+ y z . rest)))
@ -226,7 +226,7 @@
(x) (- 0 x)
(x y) (if (and (const? y)
(let ((y (const-exp y)))
(and (exact? y) (= y 1))))
(and (number? y) (exact? y) (= y 1))))
(1- x)
(- x y))
(x y z . rest) (- x (+ y z . rest)))