[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, wip-cps-bis, updated. v2.1.0-202-g2a99
From: |
Mark H Weaver |
Subject: |
[Guile-commits] GNU Guile branch, wip-cps-bis, updated. v2.1.0-202-g2a99c15 |
Date: |
Sat, 17 Aug 2013 09:09:49 +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=2a99c150bce77aa8ddc1d56f440efb81f8a98818
The branch, wip-cps-bis has been updated
via 2a99c150bce77aa8ddc1d56f440efb81f8a98818 (commit)
from 67eec8d4593b041debf63c9ccd793e6f372e2bcb (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 2a99c150bce77aa8ddc1d56f440efb81f8a98818
Author: Mark H Weaver <address@hidden>
Date: Sat Aug 17 05:07:40 2013 -0400
RTL Compiler: Fix primcall/seqs in tail position.
* module/language/cps/arities.scm (fix-entry-arities): If a primcall
that returns 0 values is found in tail position, return *unspecified*.
* test-suite/tests/rtl-compilation.test: Add test.
-----------------------------------------------------------------------
Summary of changes:
module/language/cps/arities.scm | 2 +-
test-suite/tests/rtl-compilation.test | 15 +++++++++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/module/language/cps/arities.scm b/module/language/cps/arities.scm
index ffe8ccc..7831bd7 100644
--- a/module/language/cps/arities.scm
+++ b/module/language/cps/arities.scm
@@ -55,7 +55,7 @@
($continue k
($primcall 'return (unspec)))))
(kvoid #f ($kargs () ()
- ($continue kunspec ($values ())))))
+ ($continue kunspec ($void)))))
($continue kvoid ,exp)))))
(($ $ktrunc ($ $arity () () #f () #f) kseq)
($continue kseq ,exp))
diff --git a/test-suite/tests/rtl-compilation.test
b/test-suite/tests/rtl-compilation.test
index b1812a2..dc81b68 100644
--- a/test-suite/tests/rtl-compilation.test
+++ b/test-suite/tests/rtl-compilation.test
@@ -21,13 +21,16 @@
#:use-module (system base compile)
#:use-module (system vm assembler))
-(define* (compile-via-rtl exp #:key peval? cse?)
+(define* (compile-via-rtl exp #:key peval? cse? (env (make-fresh-user-module)))
(assemble-program
- (compile exp #:to 'rtl #:opts `(#:partial-eval? ,peval? #:cse? ,cse?))))
+ (compile exp #:env env #:to 'rtl
+ #:opts `(#:partial-eval? ,peval? #:cse? ,cse?))))
(define (run-rtl exp)
((compile-via-rtl exp)))
+(define test-var #f)
+
(with-test-prefix "tail context"
(pass-if-equal 1
(run-rtl '(let ((x 1)) x)))
@@ -38,6 +41,14 @@
(pass-if-equal (if #f #f)
(run-rtl '(if #f #f)))
+ (pass-if-equal (list 1 (if #f #f))
+ (begin
+ (set! test-var #f)
+ (let ((result ((compile-via-rtl
+ '(set! test-var 1)
+ #:env (current-module)))))
+ (list test-var result))))
+
(pass-if-equal cons
(run-rtl 'cons))
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, wip-cps-bis, updated. v2.1.0-202-g2a99c15,
Mark H Weaver <=