summaryrefslogtreecommitdiff
path: root/libguile/frames.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-11-21 12:12:38 +0100
committerAndy Wingo <wingo@pobox.com>2013-11-21 16:51:15 +0100
commit0bca90aac9a209b2ae06281b00d5c3b9939d605e (patch)
tree4d7e5f3c9d182644b815bda04bb5cd5e1a318ad2 /libguile/frames.h
parenta3da449801895e3f61aa2e085e7f4ff27c0f202c (diff)
downloadguile-0bca90aac9a209b2ae06281b00d5c3b9939d605e.tar.gz
The dynamic stack records SP and FP values as offsets
* libguile/dynstack.h: * libguile/dynstack.c (PROMPT_FP, PROMPT_SP): (scm_dynstack_push_prompt, scm_dynstack_find_prompt): Prompts on the dynstack are recorded as offsets from the base stack address in this thread. * libguile/control.c (scm_c_abort): * libguile/eval.c (eval): * libguile/stacks.c (find_prompt, narrow_stack): * libguile/throw.c (pre_init_catch): * libguile/vm-engine.c (prompt): Adapt.
Diffstat (limited to 'libguile/frames.h')
-rw-r--r--libguile/frames.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/libguile/frames.h b/libguile/frames.h
index bd85b7e89..3876c2fc4 100644
--- a/libguile/frames.h
+++ b/libguile/frames.h
@@ -148,10 +148,12 @@ struct scm_frame
#define SCM_VM_FRAME_P(x) (SCM_HAS_TYP7 (x, scm_tc7_frame))
#define SCM_VM_FRAME_DATA(x) ((struct scm_frame*)SCM_CELL_WORD_1 (x))
-#define SCM_VM_FRAME_STACK_HOLDER(f) SCM_VM_FRAME_DATA(f)->stack_holder
-#define SCM_VM_FRAME_FP(f) (SCM_VM_FRAME_DATA(f)->fp_offset + scm_i_frame_stack_base(f))
-#define SCM_VM_FRAME_SP(f) (SCM_VM_FRAME_DATA(f)->sp_offset + scm_i_frame_stack_base(f))
-#define SCM_VM_FRAME_IP(f) SCM_VM_FRAME_DATA(f)->ip
+#define SCM_VM_FRAME_STACK_HOLDER(f) SCM_VM_FRAME_DATA (f)->stack_holder
+#define SCM_VM_FRAME_FP_OFFSET(f) SCM_VM_FRAME_DATA (f)->fp_offset
+#define SCM_VM_FRAME_SP_OFFSET(f) SCM_VM_FRAME_DATA (f)->sp_offset
+#define SCM_VM_FRAME_FP(f) (SCM_VM_FRAME_FP_OFFSET (f) + scm_i_frame_stack_base (f))
+#define SCM_VM_FRAME_SP(f) (SCM_VM_FRAME_SP_OFFSET (f) + scm_i_frame_stack_base (f))
+#define SCM_VM_FRAME_IP(f) SCM_VM_FRAME_DATA (f)->ip
#define SCM_VM_FRAME_OFFSET(f) scm_i_frame_offset (f)
#define SCM_VALIDATE_VM_FRAME(p,x) SCM_MAKE_VALIDATE (p, x, VM_FRAME_P)