[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-32-gebd363

From: Mark H Weaver
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-32-gebd3631
Date: Mon, 08 Oct 2012 03:57:52 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

The branch, stable-2.0 has been updated
       via  ebd363161ef533833fc48c3389075bf4db7ebe17 (commit)
      from  2446f8e126d9a7c145c4868f2a918d2dfb226d4e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ebd363161ef533833fc48c3389075bf4db7ebe17
Author: Mark H Weaver <address@hidden>
Date:   Sun Oct 7 23:57:13 2012 -0400

    Don't simplify 'equal?' to 'eq?' when constant is an *inexact* small 
    * 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.


Summary of changes:
 module/language/tree-il/primitives.scm |    1 +
 test-suite/tests/tree-il.test          |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/module/language/tree-il/primitives.scm 
index dc0a145..0c5b085 100644
--- a/module/language/tree-il/primitives.scm
+++ b/module/language/tree-il/primitives.scm
@@ -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?)
diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test
index bb7f908..0a53037 100644
--- a/test-suite/tests/tree-il.test
+++ b/test-suite/tests/tree-il.test
@@ -107,6 +107,10 @@
    (apply (primitive eq?) (const 42) (toplevel x)))
+   (apply (primitive equal?) (const 42.0) (toplevel x))
+   (apply (primitive equal?) (const 42.0) (toplevel x)))
+  (pass-if-primitives-resolved
    (apply (primitive equal?) (const #nil) (toplevel x))
    (apply (primitive eq?) (const #nil) (toplevel x))))

GNU Guile

reply via email to

[Prev in Thread] Current Thread [Next in Thread]