1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-06 15:40:29 +02:00
guile/module/language/tree-il
Andy Wingo 7f7b85cbf6 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.
2009-09-01 18:07:29 +02:00
..
analyze.scm lambda, the ultimate goto 2009-08-07 19:06:15 +02:00
compile-glil.scm fix nontail loops within loops 2009-09-01 18:07:29 +02:00
fix-letrec.scm "fix" <let>-bound lambda expressions too 2009-08-12 21:29:08 +02:00
inline.scm actually implement "fixing letrec" 2009-08-06 16:01:24 +02:00
optimize.scm let-values in terms of syntax-case, add make-tree-il-folder 2009-08-05 21:35:30 +02:00
primitives.scm loop detection in the house 2009-08-06 17:46:38 +02:00
spec.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00