mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
reorder frame layout
* libguile/frames.h: Reorder the frame layout so the return address comes below the arguments.working (SCM_FRAME_SET_RETURN_ADDRESS, SCM_FRAME_SET_MV_RETURN_ADDRESS): New macros. * libguile/frames.c (scm_vm_frame_arguments): Use the macros to access the arguments. * libguile/vm-engine.c (vm_engine): Fix for new calling convention. * libguile/vm-engine.h (INIT_FRAME): New macro. Does part of what NEW_FRAME used to do. * libguile/vm-i-system.c (call, mv-call): Shuffle args up to make room for the stack, and adapt to new calling convention. (goto/args): Shuffling down is easier now. (return, return/args): Adapt to new frame layout. * libguile/vm.c (vm_mark_stack): Adapt to new frame layout, and the possibility of there being crap on the stack. (really_make_boot_program): Remove extraneous comment.
This commit is contained in:
parent
d94be25f72
commit
03e6c16596
6 changed files with 85 additions and 123 deletions
|
@ -107,10 +107,13 @@ VM_NAME (struct scm_vm *vp, SCM program, SCM *argv, int nargs)
|
|||
|
||||
/* Initial frame */
|
||||
CACHE_REGISTER ();
|
||||
PUSH ((SCM)fp); /* dynamic link */
|
||||
PUSH (0); /* ra */
|
||||
PUSH (0); /* mvra */
|
||||
CACHE_PROGRAM ();
|
||||
PUSH (program);
|
||||
NEW_FRAME ();
|
||||
|
||||
fp = sp + 1;
|
||||
INIT_FRAME ();
|
||||
/* Initial arguments */
|
||||
PUSH (prog);
|
||||
if (SCM_UNLIKELY (sp + nargs >= stack_limit))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue