Skip to main content

VM_INTERRUPT

Constant VM_INTERRUPT 

Source
pub const VM_INTERRUPT: &str = "vm.interrupt";
Expand description

The reserved user op that stops the machine so the environment can act.

vm.interrupt(code, args...) -> value? retires everything before it, runs nothing after it, and surfaces as a typed exit from the VM. The environment supplies the op’s result, if it declares one, and resumes. It is how an injected hook hands control to the host from inside a block, whether that block is interpreted or compiled. See qcode_vm.