still trying to catch bug involving call/cc and the environment. I think I've forgotten to capture only the portion of the environment up to prompt.
This commit is contained in:
parent
c0d18edca8
commit
7751813bde
|
@ -290,7 +290,8 @@ EOF
|
||||||
", "))]
|
", "))]
|
||||||
[(PopEnvironment? stmt)
|
[(PopEnvironment? stmt)
|
||||||
(if (= (PopEnvironment-skip stmt) 0)
|
(if (= (PopEnvironment-skip stmt) 0)
|
||||||
(format "MACHINE.env.length = MACHINE.env.length - ~a;" (PopEnvironment-n stmt))
|
(format "MACHINE.env.length = MACHINE.env.length - ~a;"
|
||||||
|
(PopEnvironment-n stmt))
|
||||||
(format "MACHINE.env.splice(MACHINE.env.length-(~a),~a);"
|
(format "MACHINE.env.splice(MACHINE.env.length-(~a),~a);"
|
||||||
(+ (PopEnvironment-skip stmt)
|
(+ (PopEnvironment-skip stmt)
|
||||||
(PopEnvironment-n stmt))
|
(PopEnvironment-n stmt))
|
||||||
|
|
|
@ -69,6 +69,17 @@ EOF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(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))
|
||||||
|
"11213")
|
||||||
|
|
||||||
|
|
||||||
(test '(display 42)
|
(test '(display 42)
|
||||||
"42")
|
"42")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user