summaryrefslogtreecommitdiff
path: root/libguile/vm-i-system.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-02-19 11:37:42 +0100
committerAndy Wingo <wingo@pobox.com>2010-02-19 12:10:11 +0100
commit26e6f99fc3543cd4aa24d2d96126ae025f61ab28 (patch)
tree9832f0172928b0463ed56eed4133c0b9d3d85b08 /libguile/vm-i-system.c
parent6e84cb95b18d81ef7a8490cccdfb08d3f88116ea (diff)
downloadguile-26e6f99fc3543cd4aa24d2d96126ae025f61ab28.tar.gz
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.
Diffstat (limited to 'libguile/vm-i-system.c')
-rw-r--r--libguile/vm-i-system.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c
index c72b84d0e..5d15af7d4 100644
--- a/libguile/vm-i-system.c
+++ b/libguile/vm-i-system.c
@@ -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;
}