mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 15:40:19 +02:00
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.
This commit is contained in:
parent
03e6c16596
commit
b7946e9ec6
5 changed files with 78 additions and 57 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue