pub enum Instruction {
Show 44 variants
Drop(ValueType),
Dup,
Swap,
LoadParameter(usize),
PushLiteral(LiteralValue),
Return,
ReturnVoid,
ReturnDefault(ValueType),
BinaryOp(BinaryOperator),
LoadState(usize),
StoreState(usize),
LoadStorageDynamic,
LoadLocal(usize),
StoreLocal(usize),
LoadMappingElement {
state_index: usize,
key_types: Vec<ValueType>,
},
StoreMappingElement {
state_index: usize,
key_types: Vec<ValueType>,
},
LoadStructField {
state_index: usize,
key_types: Vec<ValueType>,
field_keys: Vec<[u8; 32]>,
field_type: ValueType,
},
StoreStructField {
state_index: usize,
key_types: Vec<ValueType>,
field_keys: Vec<[u8; 32]>,
field_type: ValueType,
},
LoadStructArrayElement {
state_index: usize,
key_types: Vec<ValueType>,
field_keys: Vec<[u8; 32]>,
element_type: ValueType,
},
StoreStructArrayElement {
state_index: usize,
key_types: Vec<ValueType>,
field_keys: Vec<[u8; 32]>,
element_type: ValueType,
},
LoadRuntimeValue(RuntimeValue),
GetSize,
CallFunction {
name: String,
arg_count: usize,
},
CallBuiltin {
builtin: BuiltinCall,
arg_count: usize,
},
EmitEvent {
event_index: usize,
arg_count: usize,
},
EmitEventByName {
name: String,
arg_count: usize,
},
Convert {
target: ConvertTarget,
},
IsType {
target: ConvertTarget,
},
NewBuffer,
NewArray {
element_type: ValueType,
},
ArrayGet,
ArraySet,
MemCpy,
ReverseItems,
BitwiseNot,
LogicalNot,
Try {
catch_target: usize,
},
EndTry {
target: usize,
},
Jump {
target: usize,
},
JumpIf {
target: usize,
},
Label(usize),
Throw,
AbortMsg,
Abort,
}Variants§
Drop(ValueType)
Dup
NeoVM DUP - duplicate the top stack item
Swap
NeoVM SWAP - swap the top two stack items
LoadParameter(usize)
PushLiteral(LiteralValue)
Return
ReturnVoid
ReturnDefault(ValueType)
BinaryOp(BinaryOperator)
LoadState(usize)
StoreState(usize)
LoadStorageDynamic
LoadLocal(usize)
StoreLocal(usize)
LoadMappingElement
StoreMappingElement
LoadStructField
StoreStructField
LoadStructArrayElement
Fields
StoreStructArrayElement
Fields
LoadRuntimeValue(RuntimeValue)
GetSize
CallFunction
CallBuiltin
EmitEvent
EmitEventByName
Convert
NeoVM CONVERT opcode. Converts the top stack item to a different StackItemType.
Fields
target: ConvertTargetIsType
NeoVM ISTYPE opcode. Checks whether the top stack item matches a StackItemType and pushes a boolean.
Fields
target: ConvertTargetNewBuffer
Allocate a new mutable buffer (NeoVM NEWBUFFER) whose length is taken from the stack.
Used to implement Solidity new bytes(n) / new string(n) allocations.
NewArray
ArrayGet
ArraySet
MemCpy
NeoVM MEMCPY opcode: copy a slice of bytes into a buffer. Stack order (bottom -> top): [dst, dst_offset, src, src_offset, count]
ReverseItems
NeoVM REVERSEITEMS opcode: reverse an Array/Buffer in place. Note: consumes one reference and does not push it back.
BitwiseNot
LogicalNot
NeoVM NOT (0xAA) — logical boolean negation.
Pops one value, pushes !value.is_truthy().
Correctly handles null (returns true), unlike PUSHF + EQUAL.
Try
EndTry
Jump
JumpIf
Label(usize)
Throw
NeoVM THROW - raises a catchable exception using the value on the stack.
AbortMsg
Abort
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Instruction
impl Debug for Instruction
Source§impl PartialEq for Instruction
impl PartialEq for Instruction
impl Eq for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more