1
Fork 0
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:
Andy Wingo 2010-02-07 14:50:51 +01:00
parent 997659f898
commit 269479e31f
6 changed files with 20 additions and 22 deletions

View file

@ -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)