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:
parent
56664c089c
commit
eebff6d7f1
1 changed files with 3 additions and 3 deletions
|
@ -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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue