1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 09:10:22 +02:00

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.
This commit is contained in:
Andy Wingo 2008-09-13 19:15:20 +02:00
parent 28106f547d
commit da320011a3
4 changed files with 27 additions and 8 deletions

View file

@ -422,7 +422,7 @@ do { \
/* New registers */ \
fp = sp - bp->nargs + 1; \
data = SCM_FRAME_DATA_ADDRESS (fp); \
sp = data + 3; \
sp = data + 4; \
CHECK_OVERFLOW (); \
stack_base = sp; \
ip = bp->base; \
@ -437,7 +437,8 @@ do { \
CONS (external, SCM_UNDEFINED, external); \
\
/* Set frame data */ \
data[3] = (SCM)ra; \
data[4] = (SCM)ra; \
data[3] = 0x0; \
data[2] = (SCM)dl; \
data[1] = SCM_BOOL_F; \
data[0] = external; \