diff --git a/compile.rkt b/compile.rkt index 3d820ad..d851f3f 100644 --- a/compile.rkt +++ b/compile.rkt @@ -877,8 +877,7 @@ `(,(make-PushControlFrame proc-return) ,(make-AssignPrimOpStatement 'val (make-GetCompiledProcedureEntry)) ,(make-GotoStatement entry-point) - ,proc-return - #;,(make-PopEnvironment n 0))))] + ,proc-return)))] [else ;; This case happens for evaluating arguments, since the diff --git a/test-compiler.rkt b/test-compiler.rkt index 8323241..509ce91 100644 --- a/test-compiler.rkt +++ b/test-compiler.rkt @@ -606,42 +606,42 @@ -#;(test '(let ([x 16]) - (call/cc (lambda (k) (+ x x)))) +(test '(let ([x 16]) + (call/cc (lambda (k) (+ x x)))) 32 #:with-bootstrapping? #t) -#;(test '(add1 (let ([x 16]) - (call/cc (lambda (k) - (k 0) - (+ x x))))) +(test '(add1 (let ([x 16]) + (call/cc (lambda (k) + (k 0) + (+ x x))))) 1 #:with-bootstrapping? #t) ;; Reference: http://lists.racket-lang.org/users/archive/2009-January/029812.html -#;(let ([op (open-output-string)]) +(let ([op (open-output-string)]) (parameterize ([current-simulated-output-port op]) (test '(begin (define program (lambda () - (let ((y (call/cc (lambda (c) c)))) - (display 1) - (call/cc (lambda (c) (y c))) - (display 2) - (call/cc (lambda (c) (y c))) - (display 3)))) - (program)) - (void) - #:with-bootstrapping? #t) + (let ((y (call/cc (lambda (c) c)))) + (display 1) + (call/cc (lambda (c) (y c))) + (display 2) + (call/cc (lambda (c) (y c))) + (display 3)))) + (program)) + (void) + #:with-bootstrapping? #t) (unless (string=? (get-output-string op) "11213") (error "puzzle failed: ~s" (get-output-string op))))) - + ;; ctak -#;(test '(begin +(test '(begin (define (ctak x y z) (call-with-current-continuation (lambda (k)