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-189-ge473


From: Mark H Weaver
Subject: [Guile-commits] GNU Guile branch, wip-cps-bis, updated. v2.1.0-189-ge4737b2
Date: Fri, 16 Aug 2013 02:02:23 +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=e4737b29e423e8031abac97722ba3a2131c2e311

The branch, wip-cps-bis has been updated
       via  e4737b29e423e8031abac97722ba3a2131c2e311 (commit)
      from  47c38e022fd67c74a01eab7fbd09fb29530e1225 (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 e4737b29e423e8031abac97722ba3a2131c2e311
Author: Mark H Weaver <address@hidden>
Date:   Thu Aug 15 21:58:41 2013 -0400

    RTL VM and Compiler: fix multiple value returns.
    
    * libguile/vm-engine.c (halt): Fix off-by-one error in retrieving
      multiple values from the frame.
    
    * module/language/tree-il/compile-cps.scm (convert): Convert tree-il
      'values' primcall into CPS $values.
    
    * test-suite/tests/rtl-compilation.test: Uncomment test.

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

Summary of changes:
 libguile/vm-engine.c                    |    2 +-
 module/language/tree-il/compile-cps.scm |    4 +++-
 test-suite/tests/rtl-compilation.test   |    2 --
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c
index 44a9e45..8a6d973 100644
--- a/libguile/vm-engine.c
+++ b/libguile/vm-engine.c
@@ -967,7 +967,7 @@ RTL_VM_NAME (SCM vm, SCM program, SCM *argv, size_t nargs_)
           ret = SCM_EOL;
           SYNC_BEFORE_GC();
           for (n = nvals; n > 0; n--)
-            ret = scm_cons (LOCAL_REF (5 + n), ret);
+            ret = scm_cons (LOCAL_REF (5 + n - 1), ret);
           ret = scm_values (ret);
         }
 
diff --git a/module/language/tree-il/compile-cps.scm 
b/module/language/tree-il/compile-cps.scm
index 07b0790..f89a842 100644
--- a/module/language/tree-il/compile-cps.scm
+++ b/module/language/tree-il/compile-cps.scm
@@ -324,7 +324,9 @@
                   k subst)
          (convert-args args
            (lambda (args)
-             (build-cps-term ($continue k ($primcall name args)))))))
+             (if (eq? name 'values)
+                 (build-cps-term ($continue k ($values args)))
+                 (build-cps-term ($continue k ($primcall name args))))))))
 
     ;; Prompts with inline handlers.
     (($ <prompt> src escape-only? tag body
diff --git a/test-suite/tests/rtl-compilation.test 
b/test-suite/tests/rtl-compilation.test
index 57af017..b1812a2 100644
--- a/test-suite/tests/rtl-compilation.test
+++ b/test-suite/tests/rtl-compilation.test
@@ -62,8 +62,6 @@
   (pass-if-equal '(1 . 2)
       (run-rtl '(cons 1 2)))
 
-  ;; FIXME: Not yet working.
-  #;
   (pass-if-equal '(1 2)
       (call-with-values (lambda () (run-rtl '(values 1 2))) list))
 


hooks/post-receive
-- 
GNU Guile



reply via email to

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