diff options
Diffstat (limited to 'libguile/eval.c')
-rw-r--r-- | libguile/eval.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/libguile/eval.c b/libguile/eval.c index 735e6c0b3..09fa71df4 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -424,23 +424,22 @@ eval (SCM x, SCM env) case SCM_M_CALL_WITH_PROMPT: { struct scm_vm *vp; - SCM k, res; + SCM k, handler, res; scm_i_jmp_buf registers; - /* We need the handler after nonlocal return to the setjmp, so - make sure it is volatile. */ - volatile SCM handler; + scm_t_ptrdiff saved_stack_depth; k = EVAL1 (CAR (mx), env); handler = EVAL1 (CDDR (mx), env); vp = scm_the_vm (); + saved_stack_depth = vp->stack_top - vp->sp; + /* Push the prompt onto the dynamic stack. */ scm_dynstack_push_prompt (&SCM_I_CURRENT_THREAD->dynstack, - SCM_F_DYNSTACK_PROMPT_ESCAPE_ONLY - | SCM_F_DYNSTACK_PROMPT_PUSH_NARGS, + SCM_F_DYNSTACK_PROMPT_ESCAPE_ONLY, k, - vp->fp - vp->stack_base, - vp->sp - vp->stack_base, + vp->stack_top - vp->fp, + saved_stack_depth, vp->ip, ®isters); @@ -449,8 +448,7 @@ eval (SCM x, SCM env) /* The prompt exited nonlocally. */ scm_gc_after_nonlocal_exit (); proc = handler; - vp = scm_the_vm (); - args = scm_i_prompt_pop_abort_args_x (vp); + args = scm_i_prompt_pop_abort_args_x (vp, saved_stack_depth); goto apply_proc; } |