mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 21:10:27 +02:00
* src/vm_system.c (call): Call return-hook before reinstating a
continuation. (tail_call): Call return-hook before a proper tail call.
This commit is contained in:
parent
dfa8d14a25
commit
89a6e8f7f3
1 changed files with 2 additions and 1 deletions
|
@ -466,10 +466,10 @@ SCM_DEFINE_INSTRUCTION (call, "%call", INST_INUM)
|
||||||
scm_wrong_num_args (ac);
|
scm_wrong_num_args (ac);
|
||||||
|
|
||||||
/* Reinstate the continuation */
|
/* Reinstate the continuation */
|
||||||
|
VM_RETURN_HOOK ();
|
||||||
SCM_VM_REINSTATE_CONT (vmp, ac);
|
SCM_VM_REINSTATE_CONT (vmp, ac);
|
||||||
LOAD ();
|
LOAD ();
|
||||||
POP (ac); /* return value */
|
POP (ac); /* return value */
|
||||||
VM_RETURN_HOOK ();
|
|
||||||
NEXT;
|
NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -519,6 +519,7 @@ SCM_DEFINE_INSTRUCTION (tail_call, "%tail-call", INST_INUM)
|
||||||
/* FIXME: Must remove the last frame.
|
/* FIXME: Must remove the last frame.
|
||||||
FIXME: We need to move arguments before that. */
|
FIXME: We need to move arguments before that. */
|
||||||
SCM *last_fp = fp;
|
SCM *last_fp = fp;
|
||||||
|
VM_RETURN_HOOK ();
|
||||||
VM_NEW_FRAME (fp, ac,
|
VM_NEW_FRAME (fp, ac,
|
||||||
SCM_VM_FRAME_DYNAMIC_LINK (last_fp),
|
SCM_VM_FRAME_DYNAMIC_LINK (last_fp),
|
||||||
SCM_VM_FRAME_STACK_POINTER (last_fp),
|
SCM_VM_FRAME_STACK_POINTER (last_fp),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue