diff options
author | Andy Wingo <wingo@pobox.com> | 2009-08-15 14:15:56 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-08-20 18:52:50 +0200 |
commit | b7946e9ec6cfb9d2d50d9f4e8cbf2532924b0a5b (patch) | |
tree | ec7c2a63656a9b67c173d2020c2d811071538430 /libguile/vm-engine.c | |
parent | 03e6c1659623d1aac4121730c1e453c626042c47 (diff) | |
download | guile-b7946e9ec6cfb9d2d50d9f4e8cbf2532924b0a5b.tar.gz |
push new frame on stack before procedure & args
* libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump
* libguile/vm-engine.c (vm_engine): Push a frame corresponding to the
mv-call.
* libguile/vm-i-system.c: Renumber ops.
(new-frame): New op, pushes a frame.
(call, mv-call): No need to shuffle args, though we do need to pop the
frame in the non-vm call case.
(goto/args): Inconsequential tweaks.
(call/cc): Push a frame if needed.
* module/language/tree-il/compile-glil.scm (flatten): Emit `new-frame'
as appropriate.
* test-suite/tests/tree-il.test: Fix to expect new-frame.
Diffstat (limited to 'libguile/vm-engine.c')
-rw-r--r-- | libguile/vm-engine.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c index 0c011d1aa..480a8cb03 100644 --- a/libguile/vm-engine.c +++ b/libguile/vm-engine.c @@ -114,7 +114,10 @@ VM_NAME (struct scm_vm *vp, SCM program, SCM *argv, int nargs) PUSH (program); fp = sp + 1; INIT_FRAME (); - /* Initial arguments */ + /* MV-call frame, function & arguments */ + PUSH ((SCM)fp); /* dynamic link */ + PUSH (0); /* ra */ + PUSH (0); /* mvra */ PUSH (prog); if (SCM_UNLIKELY (sp + nargs >= stack_limit)) goto vm_error_too_many_args; |