diff options
author | Andy Wingo <wingo@pobox.com> | 2010-02-26 13:05:25 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-02-26 13:05:25 +0100 |
commit | adbdfd6d2418b1404af48d480c2273f501517d6e (patch) | |
tree | 9624620bcedfbdd1cc29a9454b2cbcfdebdf808b /libguile/eval.c | |
parent | 416f26c7534a018c59f1c8d888dc9153f42d86d1 (diff) | |
download | guile-adbdfd6d2418b1404af48d480c2273f501517d6e.tar.gz |
rewinding prompts works
* libguile/control.h (SCM_PROMPT_HANDLER): Remove, it was unused.
(SCM_PROMPT_DYNWINDS): Rename from SCM_PROMPT_DYNENV.
* libguile/control.c: (scm_c_make_prompt): Take another arg, the winds
that are to be in place for the prompt. Fix allocation to be 4 words
instead of 5 (the handler was never used).
* libguile/eval.c (eval):
* libguile/throw.c (pre_init_catch): Adapt to scm_c_make_prompt change.
* libguile/vm-i-system.c (partial-cont-call): Grovel the new elements of
the wind list in order to call setjmp() on the new prompts. Pass
cookie to vm_reinstate_partial_continuation.
(prompt): Adapt to scm_c_make_prompt change.
* libguile/vm.c (vm_reinstate_partial_continuation): Take a cookie arg,
used when winding captured prompts onto the stack. Winding a prompt
implies making a new prompt, actually -- with new registers, a new
jump buffer, new winds, etc.
* test-suite/tests/control.test ("rewinding prompts"): Add a test for
rewinding prompts.
Diffstat (limited to 'libguile/eval.c')
-rw-r--r-- | libguile/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/eval.c b/libguile/eval.c index 1dc2bc4cd..ba358a7b3 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -432,7 +432,7 @@ eval (SCM x, SCM env) vm = scm_the_vm (); prompt = scm_c_make_prompt (eval (CAR (mx), env), SCM_VM_DATA (vm)->fp, SCM_VM_DATA (vm)->sp, SCM_VM_DATA (vm)->ip, - 0, -1); + 0, -1, scm_i_dynwinds ()); handler = eval (CDDR (mx), env); scm_i_set_dynwinds (scm_cons (prompt, scm_i_dynwinds ())); |