mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-09 15:10:29 +02:00
vm caches the dynamic state in a local var
* libguile/vm-engine.c (vm_engine): Cache the dynamic state in a local var when we enter the VM. * libguile/vm-i-system.c (wind-fluids, unwind-fluids): Use the cached dynamic state instead of going through SCM_I_CURRENT_THREAD.
This commit is contained in:
parent
6e84cb95b1
commit
26e6f99fc3
2 changed files with 3 additions and 2 deletions
|
@ -1539,7 +1539,7 @@ VM_DEFINE_INSTRUCTION (90, wind_fluids, "wind-fluids", 1, -1, 0)
|
|||
goto vm_error_stack_underflow;
|
||||
|
||||
wf = scm_i_make_with_fluids (n, sp + 1 - 2*n, sp + 1 - n);
|
||||
scm_i_swap_with_fluids (wf, SCM_I_CURRENT_THREAD->dynamic_state);
|
||||
scm_i_swap_with_fluids (wf, dynstate);
|
||||
scm_i_set_dynwinds (scm_cons (wf, scm_i_dynwinds ()));
|
||||
NEXT;
|
||||
}
|
||||
|
@ -1549,7 +1549,7 @@ VM_DEFINE_INSTRUCTION (91, unwind_fluids, "unwind-fluids", 0, 0, 0)
|
|||
SCM wf;
|
||||
wf = scm_car (scm_i_dynwinds ());
|
||||
scm_i_set_dynwinds (scm_cdr (scm_i_dynwinds ()));
|
||||
scm_i_swap_with_fluids (wf, SCM_I_CURRENT_THREAD->dynamic_state);
|
||||
scm_i_swap_with_fluids (wf, dynstate);
|
||||
NEXT;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue