mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 17:50:29 +02:00
fix frame dynamic linkage in the face of partial continuation application
* libguile/vm-i-system.c (new-frame): Though it was appealing to set the dynamic link here on the incomplete frame, we no longer do that, for the reasons mentioned in the code. (call, mv-call): Adapt to set the frame's dynamic link. * libguile/vm-engine.c (vm_engine): Don't set dynamic link here, even for boot program. * libguile/frames.c (scm_frame_num_locals, scm_frame_local_ref) (scm_frame_local_set_x): Fix up not-yet-active frame detection.
This commit is contained in:
parent
958173e489
commit
9b709b0fe1
3 changed files with 40 additions and 17 deletions
|
@ -124,7 +124,7 @@ SCM_DEFINE (scm_frame_num_locals, "frame-num-locals", 1, 0, 0,
|
|||
p = SCM_FRAME_STACK_ADDRESS (SCM_VM_FRAME_FP (frame));
|
||||
while (p <= sp)
|
||||
{
|
||||
if (p + 1 < sp && p[1] == (SCM)0)
|
||||
if (p[0] == (SCM)0)
|
||||
/* skip over not-yet-active frame */
|
||||
p += 3;
|
||||
else
|
||||
|
@ -154,7 +154,7 @@ SCM_DEFINE (scm_frame_local_ref, "frame-local-ref", 2, 0, 0,
|
|||
p = SCM_FRAME_STACK_ADDRESS (SCM_VM_FRAME_FP (frame));
|
||||
while (p <= sp)
|
||||
{
|
||||
if (p + 1 < sp && p[1] == (SCM)0)
|
||||
if (p[0] == (SCM)0)
|
||||
/* skip over not-yet-active frame */
|
||||
p += 3;
|
||||
else if (n == i)
|
||||
|
@ -186,7 +186,7 @@ SCM_DEFINE (scm_frame_local_set_x, "frame-local-set!", 3, 0, 0,
|
|||
p = SCM_FRAME_STACK_ADDRESS (SCM_VM_FRAME_FP (frame));
|
||||
while (p <= sp)
|
||||
{
|
||||
if (p + 1 < sp && p[1] == (SCM)0)
|
||||
if (p[0] == (SCM)0)
|
||||
/* skip over not-yet-active frame */
|
||||
p += 3;
|
||||
else if (n == i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue