mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 17:50:29 +02:00
fix a prompt bug
* libguile/control.h: * libguile/control.c (scm_c_make_prompt): Instead of taking a VM arg, take the registers directly. (scm_c_abort): Declare as returning void. In fact it will never return. * libguile/eval.c (eval): * libguile/throw.c (pre_init_catch): Adapt to prompt API change. * libguile/vm-i-system.c (prompt): Pass the abort ip as the ip to scm_c_make_prompt. This fixes a bug in which we used the "offset" local var, but it wasn't guaranteed to be around after a longjmp.
This commit is contained in:
parent
b8af64db76
commit
d296431516
4 changed files with 26 additions and 19 deletions
|
@ -427,9 +427,12 @@ eval (SCM x, SCM env)
|
|||
|
||||
case SCM_M_PROMPT:
|
||||
{
|
||||
SCM prompt, handler, res;
|
||||
SCM vm, prompt, handler, res;
|
||||
|
||||
prompt = scm_c_make_prompt (scm_the_vm (), eval (CAR (mx), env), 0, -1);
|
||||
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);
|
||||
handler = eval (CDDR (mx), env);
|
||||
scm_i_set_dynwinds (scm_cons (prompt, scm_i_dynwinds ()));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue