guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, wip-cps-bis, updated. v2.1.0-212-g3acf


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, wip-cps-bis, updated. v2.1.0-212-g3acf0b1
Date: Sun, 18 Aug 2013 18:14:56 +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=3acf0b1018099908fe798762c71f6be96fcf85b7

The branch, wip-cps-bis has been updated
       via  3acf0b1018099908fe798762c71f6be96fcf85b7 (commit)
       via  0ae3dcbd27b8ea67566bf7fc8cd5087dc043a31c (commit)
      from  ed1e0863e37e799a7ff47642ab0a7b58ad3258d6 (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 3acf0b1018099908fe798762c71f6be96fcf85b7
Author: Andy Wingo <address@hidden>
Date:   Sun Aug 18 20:14:51 2013 +0200

    fix non-contifiable letrec-bound functions
    
    * module/language/cps/contification.scm (contify): Fix emission of
      non-contifiable letrec-bound functions.

commit 0ae3dcbd27b8ea67566bf7fc8cd5087dc043a31c
Author: Andy Wingo <address@hidden>
Date:   Sun Aug 18 20:12:50 2013 +0200

    fix (?) let-bound function contification
    
    * module/language/cps/contification.scm (contify): For contified
      let-bound functions, don't copy the target continuation into the
      contified continuation; its body might not be in scope.  (Not entirely
      sure about this).  Instead emit a goto and rely on a later
      simplification pass to clean up.

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

Summary of changes:
 module/language/cps/contification.scm |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/module/language/cps/contification.scm 
b/module/language/cps/contification.scm
index 74e989e..d52cf3c 100644
--- a/module/language/cps/contification.scm
+++ b/module/language/cps/contification.scm
@@ -137,6 +137,10 @@
          ($fun meta self free ,(map visit-cont entries)))))
     (define (visit-cont cont)
       (rewrite-cps-cont cont
+        (($ $cont sym src
+            ($ $kargs (name) (and sym (? (cut assq <> call-substs)))
+               body))
+         (sym src ($kargs () () ,(visit-term body sym))))
         (($ $cont sym src ($ $kargs names syms body))
          (sym src ($kargs names syms ,(visit-term body sym))))
         (($ $cont sym src ($ $kentry arity tail body))
@@ -186,7 +190,7 @@
                            ,body*)))
                      (let-gensyms (k)
                        (build-cps-term
-                         ($letrec names syms (map visit-fun fun)
+                         ($letrec name sym (map visit-fun fun)
                                   ,(visit-components components))))))))))
          (visit-components (split-components (map list names syms funs))))
         (($ $continue k exp)
@@ -207,17 +211,14 @@
              (($ $fun meta self free
                  (($ $cont _ _ ($ $kentry arity
                                   ($ $cont tail-k _ ($ $ktail))
-                                  (and body ($ $cont body-k))))
+                                  (and fun-body ($ $cont body-k))))
                   ...))
               (if (and=> (bound-symbol k*)
                          (lambda (sym)
                            (contify-fun term-k sym self arity tail-k body-k)))
-                  (visit-term (build-cps-term
-                                ($letk ,body
-                                  ,(match (lookup-cont k cont-table)
-                                     (($ $kargs (_) (_) body)
-                                      body))))
-                              term-k)
+                  (build-cps-term
+                    ($letk ,(map visit-cont fun-body)
+                      ($continue k* ($values ()))))
                   (default)))
              (($ $call proc args)
               (or (contify-call proc args)


hooks/post-receive
-- 
GNU Guile



reply via email to

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