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.2-175-gaa9c1


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.2-175-gaa9c198
Date: Thu, 20 Oct 2011 21:50:25 +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=aa9c19858872a135ea959066fff26f86527a1bd0

The branch, stable-2.0 has been updated
       via  aa9c19858872a135ea959066fff26f86527a1bd0 (commit)
      from  3e54fdfc217969abb50a46ec9c9c5c02a2c7d369 (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 aa9c19858872a135ea959066fff26f86527a1bd0
Author: Andy Wingo <address@hidden>
Date:   Thu Oct 20 23:50:05 2011 +0200

    fix misallocation of some <fix> procedures
    
    * module/language/tree-il/analyze.scm (analyze-lexicals): When stepping
      into a non-tail form, we know that labels allocation will be invalid,
      so use an empty labels set.  Fixes http://debbugs.gnu.org/9769.
    
    * test-suite/tests/tree-il.test ("labels allocation"): Add a test.

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

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

diff --git a/module/language/tree-il/analyze.scm 
b/module/language/tree-il/analyze.scm
index 34f45c1..990994a 100644
--- a/module/language/tree-il/analyze.scm
+++ b/module/language/tree-il/analyze.scm
@@ -171,7 +171,7 @@
 
   ;; returns variables referenced in expr
   (define (analyze! x proc labels-in-proc tail? tail-call-args)
-    (define (step y) (analyze! y proc labels-in-proc #f #f))
+    (define (step y) (analyze! y proc '() #f #f))
     (define (step-tail y) (analyze! y proc labels-in-proc tail? #f))
     (define (step-tail-call y args) (analyze! y proc labels-in-proc #f
                                               (and tail? args)))
diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test
index 8b4c900..011fef5 100644
--- a/test-suite/tests/tree-il.test
+++ b/test-suite/tests/tree-il.test
@@ -625,6 +625,19 @@
             (call tail-call 1))))
 
 
+(with-test-prefix "labels allocation"
+  (pass-if "http://debbugs.gnu.org/9769";
+    ((compile '(lambda ()
+                 (let ((fail (lambda () #f)))
+                   (let ((test (lambda () (fail))))
+                     (test))
+                   #t))
+              ;; Prevent inlining.  We're testing analyze.scm's
+              ;; labels allocator here, and inlining it will
+              ;; reduce the entire thing to #t.
+              #:opts '(#:partial-eval? #f)))))
+
+
 (with-test-prefix "partial evaluation"
 
   (pass-if-peval


hooks/post-receive
-- 
GNU Guile



reply via email to

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