diff options
author | Mark H Weaver <mhw@netris.org> | 2013-08-17 06:38:53 -0400 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-08-24 15:27:50 +0200 |
commit | 84cc4127bd765719b2c502de4127a54867355ad5 (patch) | |
tree | 8443876e70cb6f670dd74f2bb4c2b140a1cab67f /libguile/vm-engine.c | |
parent | adb8d905df01b91f9889af3b94571bf8b7db0f44 (diff) | |
download | guile-84cc4127bd765719b2c502de4127a54867355ad5.tar.gz |
RTL: 'return-values' instruction assumes 'reset-frame' has been called.
* libguile/vm-engine.c (return-values): Remove NVALUES operand.
Don't reset the frame.
* test-suite/tests/rtl.test ("cached-toplevel-set!"): Adapt to the fact
that 'return-values' has no operand now, and that 'reset-frame' must
be done first.
Diffstat (limited to 'libguile/vm-engine.c')
-rw-r--r-- | libguile/vm-engine.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c index 0f8fed359..f2944e1cf 100644 --- a/libguile/vm-engine.c +++ b/libguile/vm-engine.c @@ -1087,22 +1087,19 @@ RTL_VM_NAME (SCM vm, SCM program, SCM *argv, size_t nargs_) RETURN_ONE_VALUE (LOCAL_REF (src)); } - /* return-values nvalues:24 + /* return-values _:24 * * Return a number of values from a call frame. This opcode * corresponds to an application of `values' in tail position. As * with tail calls, we expect that the values have already been * shuffled down to a contiguous array starting at slot 1. + * We also expect the frame has already been reset. */ - VM_DEFINE_OP (6, return_values, "return-values", OP1 (U8_U24)) + VM_DEFINE_OP (6, return_values, "return-values", OP1 (U8_X24)) { - scm_t_uint32 nvalues; + scm_t_uint32 nvalues _GL_UNUSED = FRAME_LOCALS_COUNT(); SCM *base = fp; - SCM_UNPACK_RTL_24 (op, nvalues); - - RESET_FRAME (nvalues + 1); - VM_HANDLE_INTERRUPTS; ip = SCM_FRAME_RTL_MV_RETURN_ADDRESS (fp); fp = vp->fp = SCM_FRAME_DYNAMIC_LINK (fp); |