mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
record IP in partial continuations
* libguile/control.c (reify_partial_continuation): Assert some invariants, and record the IP as the MVRA of the continuation.
This commit is contained in:
parent
ac644098bf
commit
6d804376e9
1 changed files with 12 additions and 3 deletions
|
@ -144,11 +144,20 @@ reify_partial_continuation (SCM vm, SCM prompt, SCM extwinds,
|
|||
if (cookie >= 0 && SCM_PROMPT_REGISTERS (prompt)->cookie == cookie)
|
||||
flags |= SCM_F_VM_CONT_REWINDABLE;
|
||||
|
||||
/* NULL RA and MVRA, as those get set when the cont is reinstated */
|
||||
vm_cont = scm_i_vm_capture_stack (SCM_PROMPT_REGISTERS (prompt)->sp,
|
||||
/* Since non-escape continuations should begin with a thunk application, the
|
||||
first bit of the stack should be a frame, with the saved fp equal to the fp
|
||||
that was current when the prompt was made. */
|
||||
if ((SCM*)(SCM_PROMPT_REGISTERS (prompt)->sp[1])
|
||||
!= SCM_PROMPT_REGISTERS (prompt)->fp)
|
||||
abort ();
|
||||
|
||||
/* Capture from the top of the thunk application frame up to the end. Set an
|
||||
MVRA only, as the post-abort code is in an MV context. */
|
||||
vm_cont = scm_i_vm_capture_stack (SCM_PROMPT_REGISTERS (prompt)->sp + 4,
|
||||
SCM_VM_DATA (vm)->fp,
|
||||
SCM_VM_DATA (vm)->sp,
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
SCM_VM_DATA (vm)->ip,
|
||||
flags);
|
||||
|
||||
ret = scm_make_program (cont_objcode,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue