guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-85-gcc8afa


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-85-gcc8afa2
Date: Thu, 22 Dec 2011 03:04:27 +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".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=cc8afa2b361635953dfba7f10e4193b1f243a50f

The branch, stable-2.0 has been updated
       via  cc8afa2b361635953dfba7f10e4193b1f243a50f (commit)
      from  fff39e1aa5df70a65e78a3d49d6d841f58bafde7 (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 cc8afa2b361635953dfba7f10e4193b1f243a50f
Author: Andy Wingo <address@hidden>
Date:   Wed Dec 21 22:04:18 2011 -0500

    peval fix: (cons 1 #nil) is not (list 1)
    
    * module/language/tree-il/peval.scm (peval): (cons FOO #nil) is not
      (cons FOO '()).
    
    * test-suite/tests/tree-il.test ("partial evaluation"): Add a test.

-----------------------------------------------------------------------

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

diff --git a/module/language/tree-il/peval.scm 
b/module/language/tree-il/peval.scm
index dcdf189..a6bb954 100644
--- a/module/language/tree-il/peval.scm
+++ b/module/language/tree-il/peval.scm
@@ -1040,7 +1040,7 @@ top-level bindings from ENV and return the resulting 
expression."
               (match (cons name (map for-value orig-args))
                 (('cons head tail)
                  (match tail
-                   (($ <const> src ())
+                   (($ <const> src (? (cut eq? <> '())))
                     (make-application src (make-primitive-ref #f 'list)
                                       (list head)))
                    (($ <application> src ($ <primitive-ref> _ 'list) elts)
diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test
index de82340..0b00f6f 100644
--- a/test-suite/tests/tree-il.test
+++ b/test-suite/tests/tree-il.test
@@ -1420,6 +1420,11 @@
               (apply (toplevel top) (lexical x _)))))))
   
   (pass-if-peval
+   ;; Constant folding: cons of #nil does not make list
+   (cons 1 #nil)
+   (apply (primitive cons) (const 1) (const '#nil)))
+  
+  (pass-if-peval
     ;; Constant folding: cons
    (begin (cons 1 2) #f)
    (const #f))


hooks/post-receive
-- 
GNU Guile



reply via email to

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