diff options
author | Andy Wingo <wingo@pobox.com> | 2008-09-13 19:15:20 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2008-09-13 19:22:28 +0200 |
commit | da320011a31f4b58570d8cb7e67cde39133572eb (patch) | |
tree | 85626c75e2be87d1e1dd0301eeff20c280f82e0b /libguile/frames.c | |
parent | 28106f547dc88723e02a38de7d4dc4ffc6434590 (diff) | |
download | guile-da320011a31f4b58570d8cb7e67cde39133572eb.tar.gz |
add a multiple values return address to stack frames
* libguile/frames.c (frame-mv-return-address): New accessor.
* libguile/frames.h: Update frame diagram.
(SCM_FRAME_UPPER_ADDRESS): Update for data area
growing by one pointer.
(SCM_FRAME_MV_RETURN_ADDRESS): New macro.
* libguile/vm-engine.h (NEW_FRAME): Update for frame getting bigger by a
pointer. In a normal NEW_FRAME, set the MV return address to NULL, to
indicate that this continuation does not accept multiple values.
* libguile/vm-i-system.c (tail-call): Update frame replacement code to
understand the MV return address.
(return): Make room for the MVRA.
Diffstat (limited to 'libguile/frames.c')
-rw-r--r-- | libguile/frames.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libguile/frames.c b/libguile/frames.c index c4f2f275d..36f057f7e 100644 --- a/libguile/frames.c +++ b/libguile/frames.c @@ -151,6 +151,18 @@ SCM_DEFINE (scm_frame_return_address, "frame-return-address", 1, 0, 0, } #undef FUNC_NAME +SCM_DEFINE (scm_frame_mv_return_address, "frame-mv-return-address", 1, 0, 0, + (SCM frame), + "") +#define FUNC_NAME s_scm_frame_mv_return_address +{ + SCM_VALIDATE_HEAP_FRAME (1, frame); + return scm_from_ulong ((unsigned long) + (SCM_FRAME_MV_RETURN_ADDRESS + (SCM_HEAP_FRAME_POINTER (frame)))); +} +#undef FUNC_NAME + SCM_DEFINE (scm_frame_dynamic_link, "frame-dynamic-link", 1, 0, 0, (SCM frame), "") |