pub enum Instruction {
Show 33 variants Push(Value), Drop, Call(usize), Ret, Exit, Jmp(usize), JmpFalse(usize), SetVar(usize), GetVar(usize), SetGlobal(usize), GetGlobal(usize), Cast(Type), Neg, Not, Add, Sub, Mul, Pow, Div, Rem, Eq, Ne, Lt, Gt, Le, Ge, Shl, Shr, BitOr, BitAnd, BitXor, And, Or,
}

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.

§

Neg

§

Not

§

Add

§

Sub

§

Mul

§

Pow

§

Div

§

Rem

§

Eq

§

Ne

§

Lt

§

Gt

§

Le

§

Ge

§

Shl

§

Shr

§

BitOr

§

BitAnd

§

BitXor

§

And

§

Or

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.