diff --git a/doc/ref/vm.texi b/doc/ref/vm.texi index e870f7391..60bce9ed3 100644 --- a/doc/ref/vm.texi +++ b/doc/ref/vm.texi @@ -1196,7 +1196,7 @@ balanced with @code{pop-fluid}. Reference the fluid in @var{src}, and place the value in @var{dst}. @end deftypefn -@deftypefn Instruction {} fluid-set s12:@var{fluid} s12:@var{val} +@deftypefn Instruction {} fluid-set! s12:@var{fluid} s12:@var{val} Set the value of the fluid in @var{dst} to the value in @var{src}. @end deftypefn diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c index cfb60f242..03cca8d44 100644 --- a/libguile/vm-engine.c +++ b/libguile/vm-engine.c @@ -2196,7 +2196,7 @@ VM_NAME (scm_i_thread *thread, struct scm_vm *vp, * * Set the value of the fluid in DST to the value in SRC. */ - VM_DEFINE_OP (75, fluid_set, "fluid-set", OP1 (X8_S12_S12)) + VM_DEFINE_OP (75, fluid_set, "fluid-set!", OP1 (X8_S12_S12)) { scm_t_uint16 a, b; size_t num; diff --git a/module/language/cps/compile-bytecode.scm b/module/language/cps/compile-bytecode.scm index 5e56b406f..7755b1e67 100644 --- a/module/language/cps/compile-bytecode.scm +++ b/module/language/cps/compile-bytecode.scm @@ -364,6 +364,8 @@ (from-sp (slot val)))) (($ $primcall 'unwind ()) (emit-unwind asm)) + (($ $primcall 'fluid-set! (fluid value)) + (emit-fluid-set! asm (from-sp (slot fluid)) (from-sp (slot value)))) (($ $primcall 'atomic-box-set! (box val)) (emit-atomic-box-set! asm (from-sp (slot box)) (from-sp (slot val)))) (($ $primcall 'handle-interrupts ()) diff --git a/module/system/vm/assembler.scm b/module/system/vm/assembler.scm index 5b89b049b..a3d7839f5 100644 --- a/module/system/vm/assembler.scm +++ b/module/system/vm/assembler.scm @@ -124,7 +124,7 @@ emit-pop-fluid emit-current-thread emit-fluid-ref - emit-fluid-set + emit-fluid-set! emit-string-length emit-string-ref emit-string->number