summaryrefslogtreecommitdiff
path: root/libguile/continuations.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-11-21 11:20:19 +0100
committerAndy Wingo <wingo@pobox.com>2013-11-21 11:20:19 +0100
commit89b235afd34482f2e7d2af553f43d0744895ee83 (patch)
tree520831cc6c7c85e5994bc253e02a4a200fcaef47 /libguile/continuations.c
parenteadd9eb4c9f658c9a6081d1b644c7c472d241061 (diff)
downloadguile-89b235afd34482f2e7d2af553f43d0744895ee83.tar.gz
Scheme frame objects hold relative stack offsets
* libguile/frames.h: Wrap the C interface to VM frames in BUILDING_LIBGUILE. Change VM frames to record relative offsets into a stack held by some other object, so that if the stack moves they will remain valid. * libguile/frames.c (scm_c_make_frame): Remove offset argument. (scm_i_frame_offset): Instead, compute the offset from the stack holder. (scm_i_frame_stack_base): New helper. (scm_frame_previous): Adapt. * libguile/stacks.c (scm_make_stack) * libguile/vm.c (vm_dispatch_hook): * libguile/continuations.c (scm_i_continuation_to_frame): Adapt.
Diffstat (limited to 'libguile/continuations.c')
-rw-r--r--libguile/continuations.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libguile/continuations.c b/libguile/continuations.c
index cb586e32b..7c40dbfe3 100644
--- a/libguile/continuations.c
+++ b/libguile/continuations.c
@@ -178,10 +178,9 @@ scm_i_continuation_to_frame (SCM continuation)
{
struct scm_vm_cont *data = SCM_VM_CONT_DATA (cont->vm_cont);
return scm_c_make_frame (cont->vm_cont,
- data->fp + data->reloc,
- data->sp + data->reloc,
- data->ra,
- data->reloc);
+ (data->fp + data->reloc) - data->stack_base,
+ (data->sp + data->reloc) - data->stack_base,
+ data->ra);
}
else
return SCM_BOOL_F;