[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, master, updated. release_1-9-2-138-g7f
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, master, updated. release_1-9-2-138-g7f7b85c |
Date: |
Tue, 01 Sep 2009 16:15:33 +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=7f7b85cbf68a8b83e1ad7bc78379cf2764fc9a1b
The branch, master has been updated
via 7f7b85cbf68a8b83e1ad7bc78379cf2764fc9a1b (commit)
from 3f12aedb50122209cf773174d215dc64309b9fe4 (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 7f7b85cbf68a8b83e1ad7bc78379cf2764fc9a1b
Author: Andy Wingo <address@hidden>
Date: Tue Sep 1 18:07:29 2009 +0200
fix nontail loops within loops
* module/language/tree-il/compile-glil.scm (flatten): Fix compilation of
loops within loops in non-tail positions. Will add a test case soon,
but one way to reproduce it was with the following function:
(define (test)
(let lp ()
(pk 'zero)
(let ((fk (lambda ()
(let ((fk2 (lambda () (pk 'two))))
(let ((fk3 (lambda () (if #t (pk 'three) (fk2)))))
(if #t
(fk3)
(fk2)))))))
(pk 'one)
(fk))
(lp)))
One would expect to see a sequence of "zero one three", but in fact zero
only showed once.
This should fix simplex as well.
-----------------------------------------------------------------------
Summary of changes:
module/language/tree-il/compile-glil.scm | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/module/language/tree-il/compile-glil.scm
b/module/language/tree-il/compile-glil.scm
index 86b610f..9de5c88 100644
--- a/module/language/tree-il/compile-glil.scm
+++ b/module/language/tree-il/compile-glil.scm
@@ -629,7 +629,7 @@
;; we know the vals are lambdas, we can set them to their local
;; var slots first, then capture their bindings, mutating them in
;; place.
- (let ((RA (if (eq? context 'tail) #f (make-label))))
+ (let ((new-RA (if (or (eq? context 'tail) RA) #f (make-label))))
(for-each
(lambda (x v)
(cond
@@ -657,7 +657,7 @@
allocation self emit-code)
(if (lambda-src x)
(emit-code #f (make-glil-source (lambda-src x))))
- (comp-fix (lambda-body x) RA)
+ (comp-fix (lambda-body x) (or RA new-RA))
(emit-code #f (make-glil-unbind))
(emit-label POST)))))
vals
@@ -696,7 +696,8 @@
vals
vars)
(comp-tail body)
- (emit-label RA)
+ (if new-RA
+ (emit-label new-RA))
(emit-code #f (make-glil-unbind))))
((<let-values> src names vars exp body)
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, master, updated. release_1-9-2-138-g7f7b85c,
Andy Wingo <=