diff options
author | Andy Wingo <wingo@pobox.com> | 2017-02-12 18:22:44 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-02-12 20:31:14 +0100 |
commit | 00ed4043c258b35d9200b9be3070c24355e46b63 (patch) | |
tree | 332112a2bbd70ef49c11e708d99dfc9c49e55da1 /libguile/control.c | |
parent | 5048a8afbc00e3e0a65a5d2ffccfec666ec5a68b (diff) | |
download | guile-00ed4043c258b35d9200b9be3070c24355e46b63.tar.gz |
VM continuations store FP/SP by offset
* libguile/continuations.c (scm_i_continuation_to_frame):
* libguile/stacks.c (scm_make_stack):
* libguile/vm.c (scm_i_vm_cont_to_frame, scm_i_vm_capture_stack):
(vm_return_to_continuation_inner)
(struct vm_reinstate_partial_continuation_data):
(vm_reinstate_partial_continuation_inner):
(vm_reinstate_partial_continuation):
* libguile/vm.h (sstruct scm_vm_cont): Simplify VM continuations by
recording the top FP by offset, not value + reloc.
* libguile/frames.c (frame_offset, scm_i_vm_frame_offset): Remove unused
functions.
* libguile/frames.h (SCM_VALIDATE_VM_FRAME, scm_i_vm_frame_offset):
Remove.
* libguile/control.c (reify_partial_continuation): Once we know the
base_fp, relocate the dynamic stack.
* libguile/dynstack.h:
* libguile/dynstack.c (scm_dynstack_relocate_prompts): New function.
(scm_dynstack_wind_prompt): Adapt to add new fp offset.
Diffstat (limited to 'libguile/control.c')
-rw-r--r-- | libguile/control.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libguile/control.c b/libguile/control.c index 6691d551f..636718d02 100644 --- a/libguile/control.c +++ b/libguile/control.c @@ -113,6 +113,8 @@ reify_partial_continuation (struct scm_vm *vp, if (SCM_FRAME_DYNAMIC_LINK (base_fp) != saved_fp) abort(); + scm_dynstack_relocate_prompts (dynstack, vp->stack_top - base_fp); + /* Capture from the base_fp to the top thunk application frame. */ vm_cont = scm_i_vm_capture_stack (base_fp, vp->fp, vp->sp, vp->ip, dynstack, flags); |