summaryrefslogtreecommitdiff
path: root/module/language/cps/compile-bytecode.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2014-04-11 11:51:34 +0200
committerAndy Wingo <wingo@pobox.com>2014-04-11 11:51:34 +0200
commitb85f5f851fce230d16f3c13c371839f7e619059f (patch)
tree15a58fa8f9efc5dea9d360a387b58c7fd0609a76 /module/language/cps/compile-bytecode.scm
parent6bc36ca55e76fa595ce5263cc6e701620643e2ab (diff)
downloadguile-b85f5f851fce230d16f3c13c371839f7e619059f.tar.gz
Closure conversion, reify-primitives use $kfun $cont
* module/language/cps/closure-conversion.scm: Produce a $kfun $cont. * module/language/cps/reify-primitives.scm: Produce and consume $kfun $cont. * module/language/cps/compile-bytecode.scm: Adapt.
Diffstat (limited to 'module/language/cps/compile-bytecode.scm')
-rw-r--r--module/language/cps/compile-bytecode.scm7
1 files changed, 3 insertions, 4 deletions
diff --git a/module/language/cps/compile-bytecode.scm b/module/language/cps/compile-bytecode.scm
index 8aec1d690..20414a7b0 100644
--- a/module/language/cps/compile-bytecode.scm
+++ b/module/language/cps/compile-bytecode.scm
@@ -506,13 +506,12 @@
(exp (optimize exp opts))
(exp (convert-closures exp))
(exp (reify-primitives exp))
- (exp (renumber exp))
+ (exp (match (renumber (build-cps-exp ($fun '() ,exp)))
+ (($ $fun free body) body)))
(asm (make-assembler)))
(visit-funs (lambda (fun)
(compile-fun fun asm))
- (match exp
- (($ $fun free body)
- body)))
+ exp)
(values (link-assembly asm #:page-aligned? (kw-arg-ref opts #:to-file? #f))
env
env)))