diff options
author | Andy Wingo <wingo@pobox.com> | 2010-02-25 17:33:12 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-02-26 11:05:44 +0100 |
commit | d296431516dbf14535fc6eaba551fede19c09772 (patch) | |
tree | 462156635e207a35b0f03d7bb044833278467c72 /libguile/control.c | |
parent | b8af64db76bc602517be300128be0dfb67fac89f (diff) | |
download | guile-d296431516dbf14535fc6eaba551fede19c09772.tar.gz |
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.
Diffstat (limited to 'libguile/control.c')
-rw-r--r-- | libguile/control.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libguile/control.c b/libguile/control.c index 5ca625254..c3ad5407b 100644 --- a/libguile/control.c +++ b/libguile/control.c @@ -32,8 +32,8 @@ SCM scm_sys_default_prompt_tag; SCM -scm_c_make_prompt (SCM vm, SCM k, scm_t_uint8 escape_only_p, - scm_t_int64 vm_cookie) +scm_c_make_prompt (SCM k, SCM *fp, SCM *sp, scm_t_uint8 *abort_ip, + scm_t_uint8 escape_only_p, scm_t_int64 vm_cookie) { scm_t_bits tag; SCM ret; @@ -45,9 +45,9 @@ scm_c_make_prompt (SCM vm, SCM k, scm_t_uint8 escape_only_p, ret = scm_words (tag, 5); regs = scm_gc_malloc_pointerless (sizeof (*regs), "prompt registers"); - regs->fp = SCM_VM_DATA (vm)->fp; - regs->sp = SCM_VM_DATA (vm)->sp; - regs->ip = SCM_VM_DATA (vm)->ip; + regs->fp = fp; + regs->sp = sp; + regs->ip = abort_ip; regs->cookie = vm_cookie; SCM_SET_CELL_OBJECT (ret, 1, k); @@ -190,7 +190,7 @@ reify_partial_continuation (SCM vm, SCM prompt, SCM extwinds, return ret; } -SCM +void scm_c_abort (SCM vm, SCM tag, size_t n, SCM *argv, scm_t_int64 cookie) { SCM cont, winds, prompt = SCM_BOOL_F; |