mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
fix bug in with-fluids in a non-tail position
* libguile/vm-i-system.c (VM_DEFINE_INSTRUCTION): Drop the stack items corresponding the the with-fluids object. Thanks very much to Stefan Israelsson Tampe for the fix.
This commit is contained in:
parent
e78d4bf9a9
commit
2b41a37b3c
1 changed files with 5 additions and 4 deletions
|
@ -1575,11 +1575,12 @@ VM_DEFINE_INSTRUCTION (89, wind_fluids, "wind-fluids", 1, -1, 0)
|
|||
unsigned n = FETCH ();
|
||||
SCM wf;
|
||||
|
||||
if (sp - 2*n < SCM_FRAME_UPPER_ADDRESS (fp))
|
||||
goto vm_error_stack_underflow;
|
||||
|
||||
SYNC_REGISTER ();
|
||||
wf = scm_i_make_with_fluids (n, sp + 1 - 2*n, sp + 1 - n);
|
||||
sp -= 2 * n;
|
||||
CHECK_UNDERFLOW ();
|
||||
wf = scm_i_make_with_fluids (n, sp + 1, sp + 1 + n);
|
||||
NULLSTACK (2 * n);
|
||||
|
||||
scm_i_swap_with_fluids (wf, dynstate);
|
||||
scm_i_set_dynwinds (scm_cons (wf, scm_i_dynwinds ()));
|
||||
NEXT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue