Enum little::Instruction [] [src]

pub enum Instruction {
    Output {
        location: Mem,
    },
    Property {
        name: Mem,
    },
    Push {
        location: Mem,
    },
    Pop {
        times: u16,
    },
    Jump {
        pc: u16,
    },
    CondJump {
        pc: u16,
        location: Mem,
        test: Cond,
    },
    Call {
        call: Call,
        argc: u8,
        push_result_to_stack: bool,
    },
    Load {
        binding: Binding,
        location: Mem,
    },
    Interupt,
}

Executable template instruction.

Variants

Output

Output specified Mem.

Fields

location
Property

Replace a value in StackTop1 with its property named Mem.

Fields

name
Push

Push data from Mem to stack.

Fields

location
Pop

Pop specified number of stack items.

Fields

times
Jump

Jump to instruction.

Fields

pc
CondJump

Jump to instruction based on Cond.

Fields

pc
location
test
Call

Call function with specified amount of stack items and store result to stack if bool = true.

Fields

call
argc
push_result_to_stack
Load

Copy value from Mem to Binding.

Fields

binding
location
Interupt

Interupt execution, it is up to the user to know what to do with the stack at current state.

Trait Implementations

Derived Implementations

impl Debug for Instruction

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for Instruction

fn clone(&self) -> Instruction

fn clone_from(&mut self, source: &Self)

impl Copy for Instruction