summaryrefslogtreecommitdiff
path: root/module/language/js-il/compile-javascript.scm
diff options
context:
space:
mode:
authorIan Price <ianprice90@googlemail.com>2015-06-15 23:18:16 +0100
committerIan Price <ianprice90@googlemail.com>2015-06-18 04:14:43 +0100
commit5827ad4f035bba20756373e1ce1292d8cb18f98e (patch)
tree4f30ff92ec7450af8d66c12aaa56919a3ff1e535 /module/language/js-il/compile-javascript.scm
parent48e84c5a2c170e8b1d868705400821cff486e079 (diff)
downloadguile-5827ad4f035bba20756373e1ce1292d8cb18f98e.tar.gz
Compile cps $prompt form to javascript
Diffstat (limited to 'module/language/js-il/compile-javascript.scm')
-rw-r--r--module/language/js-il/compile-javascript.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/module/language/js-il/compile-javascript.scm b/module/language/js-il/compile-javascript.scm
index 27f91ad18..05327c74a 100644
--- a/module/language/js-il/compile-javascript.scm
+++ b/module/language/js-il/compile-javascript.scm
@@ -155,6 +155,15 @@
(make-call (make-refine *scheme* (make-const "Closure"))
(list (name->id label) (make-const nfree)))))
+ (($ il:prompt escape? tag handler)
+ ;; never a tailcall
+ (make-call (make-refine (make-refine *scheme* (make-const "primitives"))
+ (make-const "prompt"))
+ (list (compile-const escape?) (name->id tag) (name->id handler))))
+
+ (($ il:seq body)
+ (make-block (map compile-exp body)))
+
(($ il:id name)
(name->id name))))