[][src]Type Definition stack_vm::InstructionFn

type InstructionFn<T> = fn(machine: &mut Machine<T>, args: &[usize]);

The instruction function signature.

Each instruction is defined in terms of a function which takes a mutable reference to a Machine and an array of usize.

Your instruction is able to manipulate the state of the machine as required (by pushing operands to the stack, for example).

The args array contains indexes into the Builder's data section. It's up to your instruction to retrieve said data.