pub enum Instruction {
}
Variants§
Nop
Does nothing.
Push(Value)
Adds a new constant to stack.
Drop
Pops the top-most value off the stack and discards the value.
Clone
Clones the top value on the stack: […, top] -> […, top, top].
Call(usize)
Calls a function (specified by index).
SetMp(isize)
Adjusts the memory pointer by the given offset.
RelToAddr(isize)
Pushes a pointer which points to the absolute address of the given relative offset.
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
.
SetVarImm(Pointer)
Pops the top of the stack in order to use it as the variable’s value. Saves this value at the specified memory location.
SetVar
Pops the top value from the stack in order to use it as the variable’s value. Then pops the second value from the stack which is a pointer. Saves this value at the memory location specified by the pointer.
GetVar
Pops the top value from the stack because it is a pointer specifying the target memory address. The value saved at this address is then loaded and pushed onto the stack.
Cast(Type)
Cast the current item on the stack to the specified type.