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
|
@ -1411,7 +1411,7 @@ scm_call_n (SCM proc, SCM *argv, size_t nargs)
|
|||
{
|
||||
jmp_buf registers;
|
||||
int resume;
|
||||
const void *prev_cookie = vp->resumable_prompt_cookie;
|
||||
jmp_buf *prev_registers = thread->vm.registers;
|
||||
SCM ret;
|
||||
|
||||
resume = setjmp (registers);
|
||||
|
@ -1422,9 +1422,9 @@ scm_call_n (SCM proc, SCM *argv, size_t nargs)
|
|||
vm_dispatch_abort_hook (vp);
|
||||
}
|
||||
|
||||
vp->resumable_prompt_cookie = ®isters;
|
||||
thread->vm.registers = ®isters;
|
||||
ret = vm_engines[vp->engine](thread, ®isters, resume);
|
||||
vp->resumable_prompt_cookie = prev_cookie;
|
||||
thread->vm.registers = prev_registers;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue