mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 15:40:19 +02:00
scm_i_make_continuation takes vm and vm_cont args explicitly
* libguile/continuations.h: * libguile/continuations.c (scm_i_make_continuation): Take VM and VM continuation arguments as well; I'm not convinced that saving all VM continuations was the right thing, and in any case we only ever saved the latest. Running a new VM should create a continuation barrier. * libguile/stacks.c (scm_make_stack): * libguile/vm-i-system.c (call/cc, tail-call/cc): Adapt callers. * libguile/vm.h (scm_i_vm_capture_continuation) (scm_i_vm_reinstate_continuation): Change to be internal, and to only capture and reinstate continuations for a particular VM.
This commit is contained in:
parent
997659f898
commit
269479e31f
6 changed files with 20 additions and 22 deletions
|
@ -1093,7 +1093,7 @@ VM_DEFINE_INSTRUCTION (64, call_cc, "call/cc", 0, 1, 1)
|
|||
SCM proc, cont;
|
||||
POP (proc);
|
||||
SYNC_ALL ();
|
||||
cont = scm_i_make_continuation (&first);
|
||||
cont = scm_i_make_continuation (&first, vm, capture_vm_cont (vp));
|
||||
if (first)
|
||||
{
|
||||
PUSH ((SCM)fp); /* dynamic link */
|
||||
|
@ -1130,7 +1130,7 @@ VM_DEFINE_INSTRUCTION (65, tail_call_cc, "tail-call/cc", 0, 1, 1)
|
|||
SCM proc, cont;
|
||||
POP (proc);
|
||||
SYNC_ALL ();
|
||||
cont = scm_i_make_continuation (&first);
|
||||
cont = scm_i_make_continuation (&first, vm, capture_vm_cont (vp));
|
||||
ASSERT (sp == vp->sp);
|
||||
ASSERT (fp == vp->fp);
|
||||
if (first)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue