1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-19 02:00:26 +02:00

Don't simplify 'equal?' to 'eq?' when constant is an *inexact* small integer.

* module/language/tree-il/primitives.scm (*primitive-expand-table*):
  Refine test for fixnums to verify that the small integer is exact.

* test-suite/tests/tree-il.test ("primitives"): Add test.
This commit is contained in:
Mark H Weaver 2012-10-07 23:57:13 -04:00
parent 2446f8e126
commit ebd363161e
2 changed files with 5 additions and 0 deletions

View file

@ -509,6 +509,7 @@
(eq? #nil v)
(symbol? v)
(and (integer? v)
(exact? v)
(<= v most-positive-fixnum)
(>= v most-negative-fixnum)))
(make-application src (make-primitive-ref #f 'eq?)