#[repr(u8)]pub enum Opcode {
Show 90 variants
Nop = 0,
Break = 1,
LoadNil = 2,
LoadB = 3,
LoadN = 4,
LoadK = 5,
Move = 6,
GetGlobal = 7,
SetGlobal = 8,
GetUpval = 9,
SetUpval = 10,
CloseUpvals = 11,
GetImport = 12,
GetTable = 13,
SetTable = 14,
GetTableKs = 15,
SetTableKs = 16,
GetTableN = 17,
SetTableN = 18,
NewClosure = 19,
NameCall = 20,
Call = 21,
Return = 22,
Jump = 23,
JumpBack = 24,
JumpIf = 25,
JumpIfNot = 26,
JumpIfEq = 27,
JumpIfLe = 28,
JumpIfLt = 29,
JumpIfNotEq = 30,
JumpIfNotLe = 31,
JumpIfNotLt = 32,
Add = 33,
Sub = 34,
Mul = 35,
Div = 36,
Mod = 37,
Pow = 38,
AddK = 39,
SubK = 40,
MulK = 41,
DivK = 42,
ModK = 43,
PowK = 44,
And = 45,
Or = 46,
AndK = 47,
OrK = 48,
Concat = 49,
Not = 50,
Minus = 51,
Length = 52,
NewTable = 53,
DupTable = 54,
SetList = 55,
ForNPrep = 56,
ForNLoop = 57,
ForGLoop = 58,
ForGPrepInext = 59,
FastCall3 = 60,
ForGPrepNext = 61,
NativeCall = 62,
GetVarargs = 63,
DupClosure = 64,
PrepVarargs = 65,
LoadKx = 66,
JumpX = 67,
FastCall = 68,
Coverage = 69,
Capture = 70,
SubRK = 71,
DivRK = 72,
FastCall1 = 73,
FastCall2 = 74,
FastCall2K = 75,
ForGPrep = 76,
JumpXEqKNil = 77,
JumpXEqKB = 78,
JumpXEqKN = 79,
JumpXEqKS = 80,
IDiv = 81,
IDivK = 82,
GetUDataKs = 83,
SetUDataKs = 84,
NameCallUData = 85,
NewClassMember = 86,
CallFb = 87,
CmpProto = 88,
NewClass = 89,
}Variants§
Nop = 0
Break = 1
LoadNil = 2
LoadB = 3
LoadN = 4
LoadK = 5
Move = 6
GetGlobal = 7
SetGlobal = 8
GetUpval = 9
SetUpval = 10
CloseUpvals = 11
GetImport = 12
GetTable = 13
SetTable = 14
GetTableKs = 15
SetTableKs = 16
GetTableN = 17
SetTableN = 18
NewClosure = 19
NameCall = 20
Call = 21
Return = 22
Jump = 23
JumpBack = 24
JumpIf = 25
JumpIfNot = 26
JumpIfEq = 27
JumpIfLe = 28
JumpIfLt = 29
JumpIfNotEq = 30
JumpIfNotLe = 31
JumpIfNotLt = 32
Add = 33
Sub = 34
Mul = 35
Div = 36
Mod = 37
Pow = 38
AddK = 39
SubK = 40
MulK = 41
DivK = 42
ModK = 43
PowK = 44
And = 45
Or = 46
AndK = 47
OrK = 48
Concat = 49
Not = 50
Minus = 51
Length = 52
NewTable = 53
DupTable = 54
SetList = 55
ForNPrep = 56
ForNLoop = 57
ForGLoop = 58
ForGPrepInext = 59
FastCall3 = 60
ForGPrepNext = 61
NativeCall = 62
GetVarargs = 63
DupClosure = 64
PrepVarargs = 65
LoadKx = 66
JumpX = 67
FastCall = 68
Coverage = 69
Capture = 70
SubRK = 71
DivRK = 72
FastCall1 = 73
FastCall2 = 74
FastCall2K = 75
ForGPrep = 76
JumpXEqKNil = 77
JumpXEqKB = 78
JumpXEqKN = 79
JumpXEqKS = 80
IDiv = 81
IDivK = 82
GetUDataKs = 83
SetUDataKs = 84
NameCallUData = 85
NewClassMember = 86
CallFb = 87
CmpProto = 88
NewClass = 89
Implementations§
Source§impl Opcode
impl Opcode
pub const COUNT: usize
pub fn from_byte(value: u8) -> Option<Self>
Sourcepub fn jump_target(self, instruction: Instruction, pc: u32) -> Option<i32>
pub fn jump_target(self, instruction: Instruction, pc: u32) -> Option<i32>
Computes the jump target for this opcode/instruction pair.
instruction must be the instruction word whose opcode decoded to
self; AUX words are not valid inputs.
pub fn length(self) -> usize
pub fn is_fast_call(self) -> bool
pub fn is_jump_d(self) -> bool
pub fn is_skip_c(self) -> bool
pub fn is_fallthrough(self) -> bool
pub fn is_loop_jump(self) -> bool
Trait Implementations§
impl Copy for Opcode
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