#[repr(u8)]pub enum Opcode {
Show 72 variants
Push = 0,
Pop = 1,
Dup = 2,
LoadLocal = 3,
StoreLocal = 4,
LoadGlobal = 5,
StoreGlobal = 6,
LoadUpvalue = 7,
StoreUpvalue = 8,
Add = 9,
Sub = 10,
Mul = 11,
Div = 12,
Mod = 13,
Pow = 14,
Neg = 15,
BitAnd = 16,
BitOr = 17,
BitXor = 18,
BitNot = 19,
Shl = 20,
Shr = 21,
Eq = 22,
Ne = 23,
Lt = 24,
Le = 25,
Gt = 26,
Ge = 27,
AddImm = 28,
SubImm = 29,
MulImm = 30,
EqImm = 31,
NeImm = 32,
LtImm = 33,
LeImm = 34,
GtImm = 35,
GeImm = 36,
And = 37,
Or = 38,
Not = 39,
Jump = 40,
JumpIfFalse = 41,
JumpIfTrue = 42,
Call = 43,
TailCall = 44,
Return = 45,
GetProperty = 46,
SetProperty = 47,
Invoke = 48,
BuildArray = 49,
BuildMap = 50,
IndexGet = 51,
IndexSet = 52,
CreateClass = 53,
CreateInstance = 54,
GetMethod = 55,
MatchPattern = 56,
MakeClosure = 57,
Throw = 58,
TryBegin = 59,
TryEnd = 60,
WrapOk = 61,
WrapErr = 62,
WrapSome = 63,
UnwrapOk = 64,
UnwrapErr = 65,
UnwrapSome = 66,
Try = 67,
Nop = 68,
Halt = 69,
CallDirect = 70,
Argc = 71,
}Expand description
Opcode is Copy and serialized as a single byte in the binary format.
Keep variants in a stable order; append-only.
Variants§
Push = 0
Pop = 1
Dup = 2
LoadLocal = 3
StoreLocal = 4
LoadGlobal = 5
StoreGlobal = 6
LoadUpvalue = 7
StoreUpvalue = 8
Add = 9
Sub = 10
Mul = 11
Div = 12
Mod = 13
Pow = 14
Neg = 15
BitAnd = 16
BitOr = 17
BitXor = 18
BitNot = 19
Shl = 20
Shr = 21
Eq = 22
Ne = 23
Lt = 24
Le = 25
Gt = 26
Ge = 27
AddImm = 28
SubImm = 29
MulImm = 30
EqImm = 31
NeImm = 32
LtImm = 33
LeImm = 34
GtImm = 35
GeImm = 36
And = 37
Or = 38
Not = 39
Jump = 40
JumpIfFalse = 41
JumpIfTrue = 42
Call = 43
TailCall = 44
Return = 45
GetProperty = 46
SetProperty = 47
Invoke = 48
BuildArray = 49
BuildMap = 50
IndexGet = 51
IndexSet = 52
CreateClass = 53
CreateInstance = 54
GetMethod = 55
MatchPattern = 56
MakeClosure = 57
Throw = 58
TryBegin = 59
TryEnd = 60
WrapOk = 61
WrapErr = 62
WrapSome = 63
UnwrapOk = 64
UnwrapErr = 65
UnwrapSome = 66
Try = 67
? — Ok/Some → inner; Err/Null early-return from current frame.
Nop = 68
Halt = 69
CallDirect = 70
Direct call to a known chunk. operand = (chunk_index << 16) | arity. Stack: [func_slot_placeholder, args…]
Argc = 71
Push the number of arguments actually passed to the current frame.
Implementations§
Trait Implementations§
impl Copy for Opcode
Source§impl<'de> Deserialize<'de> for Opcode
impl<'de> Deserialize<'de> for Opcode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Opcode
impl StructuralPartialEq for Opcode
Auto Trait Implementations§
impl Freeze for Opcode
impl RefUnwindSafe for Opcode
impl Send for Opcode
impl Sync for Opcode
impl Unpin for Opcode
impl UnsafeUnpin for Opcode
impl UnwindSafe for Opcode
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
Mutably borrows from an owned value. Read more