mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
Refactor handling of active VM registers
* libguile/threads.h (scm_thread): Remove unused jmp_buf regs member. * libguile/vm.h (struct scm_vm): Rename resumable_prompt_cookie to just "registers"; we know it's a jmp_buf pointer. * libguile/vm.c (scm_call_n): * libguile/throw.c (catch): * libguile/eval.c (eval): * libguile/control.c (scm_suspendable_continuation_p): Adapt to cookie renaming.
This commit is contained in:
parent
fd4eb14751
commit
18431e6e63
6 changed files with 14 additions and 15 deletions
|
@ -439,7 +439,7 @@ eval (SCM x, SCM env)
|
|||
scm_thread *t;
|
||||
SCM k, handler, res;
|
||||
jmp_buf registers;
|
||||
const void *prev_cookie;
|
||||
jmp_buf *prev_registers;
|
||||
ptrdiff_t saved_stack_depth;
|
||||
|
||||
k = EVAL1 (CAR (mx), env);
|
||||
|
@ -457,11 +457,11 @@ eval (SCM x, SCM env)
|
|||
t->vm.ip,
|
||||
®isters);
|
||||
|
||||
prev_cookie = t->vm.resumable_prompt_cookie;
|
||||
prev_registers = t->vm.registers;
|
||||
if (setjmp (registers))
|
||||
{
|
||||
/* The prompt exited nonlocally. */
|
||||
t->vm.resumable_prompt_cookie = prev_cookie;
|
||||
t->vm.registers = prev_registers;
|
||||
scm_gc_after_nonlocal_exit ();
|
||||
proc = handler;
|
||||
args = scm_i_prompt_pop_abort_args_x (&t->vm, saved_stack_depth);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue