Enum rush_interpreter_vm::Instruction
source · pub enum Instruction {
}
Variants§
Push(Value)
Adds a new constant to stack.
Drop
Pops the top-most value off the stack and discards the value.
Call(usize)
Calls a function (specified by index).
Ret
Returns from the current function call.
Exit
Special instruction for exit calls.
Jmp(usize)
Jumps to the specified index.
JmpFalse(usize)
Jumps to the specified index if the value on the stack is false
.
SetVar(usize)
Pops the top element off the stack and binds it to the specified number.
GetVar(usize)
Retrieves the variable with the specified index and places it on top of the stack.
SetGlobal(usize)
GetGlobal(usize)
Retrieves the global with the specified index and places it on top of the stack.
Cast(Type)
Cast the current item on the stack to the specified type.