summaryrefslogtreecommitdiff
path: root/libguile/frames.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2017-02-12 18:22:44 +0100
committerAndy Wingo <wingo@pobox.com>2017-02-12 20:31:14 +0100
commit00ed4043c258b35d9200b9be3070c24355e46b63 (patch)
tree332112a2bbd70ef49c11e708d99dfc9c49e55da1 /libguile/frames.c
parent5048a8afbc00e3e0a65a5d2ffccfec666ec5a68b (diff)
downloadguile-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/frames.c')
-rw-r--r--libguile/frames.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/libguile/frames.c b/libguile/frames.c
index bc2e501da..11d4f12ee 100644
--- a/libguile/frames.c
+++ b/libguile/frames.c
@@ -76,22 +76,6 @@ frame_stack_top (enum scm_vm_frame_kind kind, const struct scm_frame *frame)
}
}
-static scm_t_ptrdiff
-frame_offset (enum scm_vm_frame_kind kind, const struct scm_frame *frame)
-{
- switch (kind)
- {
- case SCM_VM_FRAME_KIND_CONT:
- return ((struct scm_vm_cont *) frame->stack_holder)->reloc;
-
- case SCM_VM_FRAME_KIND_VM:
- return 0;
-
- default:
- abort ();
- }
-}
-
union scm_vm_stack_element*
scm_i_frame_stack_top (SCM frame)
#define FUNC_NAME "frame-stack-top"
@@ -103,18 +87,6 @@ scm_i_frame_stack_top (SCM frame)
}
#undef FUNC_NAME
-scm_t_ptrdiff
-scm_i_frame_offset (SCM frame)
-#define FUNC_NAME "frame-offset"
-{
- SCM_VALIDATE_VM_FRAME (1, frame);
-
- return frame_offset (SCM_VM_FRAME_KIND (frame),
- SCM_VM_FRAME_DATA (frame));
-
-}
-#undef FUNC_NAME
-
/* Scheme interface */