mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
fix the ping-pong between evaluator and vm stacks in make-stack
* libguile/frames.c (vm_frame_print): Add a frame printer. * libguile/stacks.c (stack_depth, read_frames): Only switch the VM stack for boot program dframes. * libguile/vm-engine.c (VM_NAME): Push one debug frame per invocation, unconditionally. (If we push them at all, of course.)
This commit is contained in:
parent
3b9e095b44
commit
2f9769b60c
3 changed files with 35 additions and 22 deletions
|
@ -120,15 +120,11 @@ VM_NAME (struct scm_vm *vp, SCM program, SCM *argv, int nargs)
|
|||
|
||||
#if VM_PUSH_DEBUG_FRAMES
|
||||
debug.prev = scm_i_last_debug_frame ();
|
||||
if (!(debug.prev && debug.prev->status == SCM_APPLYFRAME
|
||||
&& debug.prev->vect[0].a.proc != prog))
|
||||
{
|
||||
debug.status = SCM_APPLYFRAME;
|
||||
debug.vect = &debug_vect_body;
|
||||
debug.vect[0].a.proc = program; /* the boot program */
|
||||
debug.vect[0].a.args = SCM_EOL;
|
||||
scm_i_set_last_debug_frame (&debug);
|
||||
}
|
||||
debug.status = SCM_APPLYFRAME;
|
||||
debug.vect = &debug_vect_body;
|
||||
debug.vect[0].a.proc = program; /* the boot program */
|
||||
debug.vect[0].a.args = SCM_EOL;
|
||||
scm_i_set_last_debug_frame (&debug);
|
||||
#endif
|
||||
|
||||
/* Initial frame */
|
||||
|
@ -169,8 +165,7 @@ VM_NAME (struct scm_vm *vp, SCM program, SCM *argv, int nargs)
|
|||
vm_done:
|
||||
SYNC_ALL ();
|
||||
#if VM_PUSH_DEBUG_FRAMES
|
||||
if (debug.status == SCM_APPLYFRAME)
|
||||
scm_i_set_last_debug_frame (debug.prev);
|
||||
scm_i_set_last_debug_frame (debug.prev);
|
||||
#endif
|
||||
return finish_args;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue