mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 16:57:35 +02:00
Emit call/cc for scheme base
This commit is contained in:
parent
b03d1461f8
commit
7b3dc0b0f3
1 changed files with 2 additions and 2 deletions
|
@ -125,7 +125,7 @@
|
||||||
(cps-convert expr))
|
(cps-convert expr))
|
||||||
input-program)))
|
input-program)))
|
||||||
(cond
|
(cond
|
||||||
(program?
|
((and library? (equal? lib-name '(scheme base)))
|
||||||
(set! globals (cons 'call/cc globals))
|
(set! globals (cons 'call/cc globals))
|
||||||
(set! module-globals (cons 'call/cc module-globals))
|
(set! module-globals (cons 'call/cc module-globals))
|
||||||
(set! input-program
|
(set! input-program
|
||||||
|
@ -137,7 +137,7 @@
|
||||||
(lambda (k f) (f k (lambda (_ result) (k result)))))
|
(lambda (k f) (f k (lambda (_ result) (k result)))))
|
||||||
cps)))
|
cps)))
|
||||||
(else
|
(else
|
||||||
;; Compiling a library, no need for call/cc yet
|
;; No need for call/cc yet
|
||||||
(set! input-program cps))))
|
(set! input-program cps))))
|
||||||
(trace:info "---------------- after CPS:")
|
(trace:info "---------------- after CPS:")
|
||||||
(trace:info input-program) ;pretty-print
|
(trace:info input-program) ;pretty-print
|
||||||
|
|
Loading…
Add table
Reference in a new issue