#[repr(u8)]pub enum Opcode {
Show 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,
}Expand description
Luau bytecode opcode stored in the low byte of each instruction word.
Variants§
Nop = 0
No operation.
Break = 1
Debugger break.
LoadNil = 2
Load nil.
LoadB = 3
Load boolean.
LoadN = 4
Load small number.
LoadK = 5
Load constant.
Move = 6
Move register.
GetGlobal = 7
Get global.
SetGlobal = 8
Set global.
GetUpval = 9
Get upvalue.
SetUpval = 10
Set upvalue.
CloseUpvals = 11
Close upvalues.
GetImport = 12
Get import.
GetTable = 13
Get table by register key.
SetTable = 14
Set table by register key.
GetTableKs = 15
Get table by string key.
SetTableKs = 16
Set table by string key.
GetTableN = 17
Get table by small integer key.
SetTableN = 18
Set table by small integer key.
NewClosure = 19
New closure.
NameCall = 20
Method-call preparation.
Call = 21
Function call.
Return = 22
Return from function.
Jump = 23
Relative jump.
JumpBack = 24
Backedge jump.
JumpIf = 25
Conditional truthy jump.
JumpIfNot = 26
Conditional falsey jump.
JumpIfEq = 27
Equality jump.
JumpIfLe = 28
Less-or-equal jump.
JumpIfLt = 29
Less-than jump.
JumpIfNotEq = 30
Inequality jump.
JumpIfNotLe = 31
Not less-or-equal jump.
JumpIfNotLt = 32
Not less-than jump.
Add = 33
Addition.
Sub = 34
Subtraction.
Mul = 35
Multiplication.
Div = 36
Division.
Mod = 37
Modulo.
Pow = 38
Power.
AddK = 39
Addition with constant.
SubK = 40
Subtraction with constant.
MulK = 41
Multiplication with constant.
DivK = 42
Division with constant.
ModK = 43
Modulo with constant.
PowK = 44
Power with constant.
And = 45
Logical and.
Or = 46
Logical or.
AndK = 47
Logical and with constant.
OrK = 48
Logical or with constant.
Concat = 49
Concatenation.
Not = 50
Logical not.
Minus = 51
Numeric negation.
Length = 52
Length.
NewTable = 53
Create table.
DupTable = 54
Duplicate table template.
SetList = 55
Set list.
ForNPrep = 56
Numeric-for preparation.
ForNLoop = 57
Numeric-for loop.
ForGLoop = 58
Generic-for loop.
ForGPrepInext = 59
Generic-for preparation for inext.
FastCall3 = 60
Fastcall with three register arguments.
ForGPrepNext = 61
Generic-for preparation for next.
NativeCall = 62
Runtime native call pseudo-instruction.
GetVarargs = 63
Get varargs.
DupClosure = 64
Duplicate closure.
PrepVarargs = 65
Prepare varargs.
LoadKx = 66
Load extended constant.
JumpX = 67
Long relative jump.
FastCall = 68
Fastcall.
Coverage = 69
Coverage counter.
Capture = 70
Upvalue capture.
SubRk = 71
Constant-minus-register subtraction.
DivRk = 72
Constant-divided-by-register division.
FastCall1 = 73
Fastcall with one register argument.
FastCall2 = 74
Fastcall with two register arguments.
FastCall2K = 75
Fastcall with one register and one constant argument.
ForGPrep = 76
Generic-for preparation.
JumpXEqKNil = 77
Nil equality jump.
JumpXEqKB = 78
Boolean equality jump.
JumpXEqKN = 79
Number equality jump.
JumpXEqKS = 80
String equality jump.
IDiv = 81
Floor division.
IDivK = 82
Floor division with constant.
GetUdataKs = 83
Userdata field get.
SetUdataKs = 84
Userdata field set.
NameCallUdata = 85
Userdata method-call preparation.
NewClassMember = 86
Register class member.
CallFb = 87
Call with feedback slot.
CmpProto = 88
Compare closure proto.