// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details1#pragma once23// clang-format off45// This header contains the bytecode definition for Luau interpreter6// Creating the bytecode is outside the scope of this file and is handled by bytecode builder (BytecodeBuilder.h) and bytecode compiler (Compiler.h)7// Note that ALL enums declared in this file are order-sensitive since the values are baked into bytecode that needs to be processed by legacy clients.89// # Bytecode definitions10// Bytecode instructions are using "word code" - each instruction is one or many 32-bit words.11// The first word in the instruction is always the instruction header, and *must* contain the opcode (enum below) in the least significant byte.12//13// Instruction word can be encoded using one of the following encodings:14// ABC - least-significant byte for the opcode, followed by three bytes, A, B and C; each byte declares a register index, small index into some other table or an unsigned integral value15// AD - least-significant byte for the opcode, followed by A byte, followed by D half-word (16-bit integer). D is a signed integer that commonly specifies constant table index or jump offset16// E - least-significant byte for the opcode, followed by E (24-bit integer). E is a signed integer that commonly specifies a jump offset17//18// Instruction word is sometimes followed by one extra word, indicated as AUX - this is just a 32-bit word and is decoded according to the specification for each opcode.19// For each opcode the encoding is *static* - that is, based on the opcode you know apriori how large the instruction is, with the exception of NEWCLOSURE2021// # Bytecode indices22// Bytecode instructions commonly refer to integer values that define offsets or indices for various entities. For each type, there's a maximum encodable value.23// Note that in some cases, the compiler will set a lower limit than the maximum encodable value is to prevent fragile code into bumping against the limits whenever we change the compilation details.24// Additionally, in some specific instructions such as ANDK, the limit on the encoded value is smaller; this means that if a value is larger, a different instruction must be selected.25//26// Registers: 0-254. Registers refer to the values on the function's stack frame, including arguments.27// Upvalues: 0-199. Upvalues refer to the values stored in the closure object.28// Constants: 0-2^23-1. Constants are stored in a table allocated with each proto; to allow for future bytecode tweaks the encodable value is limited to 23 bits.29// Closures: 0-2^15-1. Closures are created from child protos via a child index; the limit is for the number of closures immediately referenced in each function.30// Jumps: -2^23..2^23. Jump offsets are specified in word increments, so jumping over an instruction may sometimes require an offset of 2 or more. Note that for jump instructions with AUX, the AUX word is included as part of the jump offset.3132// # Bytecode versions33// Bytecode serialized format embeds a version number, that dictates both the serialized form as well as the allowed instructions. As long as the bytecode version falls into supported34// range (indicated by LBC_BYTECODE_MIN / LBC_BYTECODE_MAX) and was produced by Luau compiler, it should load and execute correctly.35//36// Note that Luau runtime doesn't provide indefinite bytecode compatibility: support for older versions gets removed over time. As such, bytecode isn't a durable storage format and it's expected37// that Luau users can recompile bytecode from source on Luau version upgrades if necessary.3839// # Bytecode version history40//41// Note: due to limitations of the versioning scheme, some bytecode blobs that carry version 2 are using features from version 3. Starting from version 3, version should be sufficient to indicate bytecode compatibility.42//43// Version 1: Baseline version for the open-source release. Supported until 0.521.44// Version 2: Adds Proto::linedefined. Supported until 0.544.45// Version 3: Adds FORGPREP/JUMPXEQK* and enhances AUX encoding for FORGLOOP. Removes FORGLOOP_NEXT/INEXT and JUMPIFEQK/JUMPIFNOTEQK. Currently supported.46// Version 4: Adds Proto::flags, typeinfo, and floor division opcodes IDIV/IDIVK. Currently supported.47// Version 5: Adds SUBRK/DIVRK and vector constants. Currently supported.48// Version 6: Adds FASTCALL3. Currently supported.49// Version 7: Adds LBC_CONSTANT_TABLE_WITH_CONSTANTS for DUPTABLE with pre-filled constant values. Currently supported.50// Version 8: Adds LBC_CONSTANT_INTEGER for 64-bit integer constants. Currently supported.5152// # Bytecode type information history53// Version 1: (from bytecode version 4) Type information for function signature. Currently supported.54// Version 2: (from bytecode version 4) Type information for arguments, upvalues, locals and some temporaries. Currently supported.55// Version 3: (from bytecode version 5) Type information for userdata type names and their index mapping. Currently supported.5657// Bytecode opcode, part of the instruction header58enum LuauOpcode59{60// NOP: noop61LOP_NOP,6263// BREAK: debugger break64LOP_BREAK,6566// LOADNIL: sets register to nil67// A: target register68LOP_LOADNIL,6970// LOADB: sets register to boolean and jumps to a given short offset (used to compile comparison results into a boolean)71// A: target register72// B: value (0/1)73// C: jump offset74LOP_LOADB,7576// LOADN: sets register to a number literal77// A: target register78// D: value (-32768..32767)79LOP_LOADN,8081// LOADK: sets register to an entry from the constant table from the proto (number/vector/string)82// A: target register83// D: constant table index (0..32767)84LOP_LOADK,8586// MOVE: move (copy) value from one register to another87// A: target register88// B: source register89LOP_MOVE,9091// GETGLOBAL: load value from global table using constant string as a key92// A: target register93// C: predicted slot index (based on hash)94// AUX: constant table index95LOP_GETGLOBAL,9697// SETGLOBAL: set value in global table using constant string as a key98// A: source register99// C: predicted slot index (based on hash)100// AUX: constant table index101LOP_SETGLOBAL,102103// GETUPVAL: load upvalue from the upvalue table for the current function104// A: target register105// B: upvalue index106LOP_GETUPVAL,107108// SETUPVAL: store value into the upvalue table for the current function109// A: target register110// B: upvalue index111LOP_SETUPVAL,112113// CLOSEUPVALS: close (migrate to heap) all upvalues that were captured for registers >= target114// A: target register115LOP_CLOSEUPVALS,116117// GETIMPORT: load imported global table global from the constant table118// A: target register119// D: constant table index (0..32767); we assume that imports are loaded into the constant table120// AUX: 3 10-bit indices of constant strings that, combined, constitute an import path; length of the path is set by the top 2 bits (1,2,3)121LOP_GETIMPORT,122123// GETTABLE: load value from table into target register using key from register124// A: target register125// B: table register126// C: index register127LOP_GETTABLE,128129// SETTABLE: store source register into table using key from register130// A: source register131// B: table register132// C: index register133LOP_SETTABLE,134135// GETTABLEKS: load value from table into target register using constant string as a key136// A: target register137// B: table register138// C: predicted slot index (based on hash)139// AUX: constant table index140LOP_GETTABLEKS,141142// SETTABLEKS: store source register into table using constant string as a key143// A: source register144// B: table register145// C: predicted slot index (based on hash)146// AUX: constant table index147LOP_SETTABLEKS,148149// GETTABLEN: load value from table into target register using small integer index as a key150// A: target register151// B: table register152// C: index-1 (index is 1..256)153LOP_GETTABLEN,154155// SETTABLEN: store source register into table using small integer index as a key156// A: source register157// B: table register158// C: index-1 (index is 1..256)159LOP_SETTABLEN,160161// NEWCLOSURE: create closure from a child proto; followed by a CAPTURE instruction for each upvalue162// A: target register163// D: child proto index (0..32767)164LOP_NEWCLOSURE,165166// NAMECALL: prepare to call specified method by name by loading function from source register using constant index into target register and copying source register into target register + 1167// A: target register168// B: source register169// C: predicted slot index (based on hash)170// AUX: constant table index171// Note that this instruction must be followed directly by CALL; it prepares the arguments172// This instruction is roughly equivalent to GETTABLEKS + MOVE pair, but we need a special instruction to support custom __namecall metamethod173LOP_NAMECALL,174175// CALL: call specified function176// A: register where the function object lives, followed by arguments; results are placed starting from the same register177// B: argument count + 1, or 0 to preserve all arguments up to top (MULTRET)178// C: result count + 1, or 0 to preserve all values and adjust top (MULTRET)179LOP_CALL,180181// RETURN: returns specified values from the function182// A: register where the returned values start183// B: number of returned values + 1, or 0 to return all values up to top (MULTRET)184LOP_RETURN,185186// JUMP: jumps to target offset187// D: jump offset (-32768..32767; 0 means "next instruction" aka "don't jump")188LOP_JUMP,189190// JUMPBACK: jumps to target offset; this is equivalent to JUMP but is used as a safepoint to be able to interrupt while/repeat loops191// D: jump offset (-32768..32767; 0 means "next instruction" aka "don't jump")192LOP_JUMPBACK,193194// JUMPIF: jumps to target offset if register is not nil/false195// A: source register196// D: jump offset (-32768..32767; 0 means "next instruction" aka "don't jump")197LOP_JUMPIF,198199// JUMPIFNOT: jumps to target offset if register is nil/false200// A: source register201// D: jump offset (-32768..32767; 0 means "next instruction" aka "don't jump")202LOP_JUMPIFNOT,203204// JUMPIFEQ, JUMPIFLE, JUMPIFLT, JUMPIFNOTEQ, JUMPIFNOTLE, JUMPIFNOTLT: jumps to target offset if the comparison is true (or false, for NOT variants)205// A: source register 1206// D: jump offset (-32768..32767; 1 means "next instruction" aka "don't jump")207// AUX: source register 2208LOP_JUMPIFEQ,209LOP_JUMPIFLE,210LOP_JUMPIFLT,211LOP_JUMPIFNOTEQ,212LOP_JUMPIFNOTLE,213LOP_JUMPIFNOTLT,214215// ADD, SUB, MUL, DIV, MOD, POW: compute arithmetic operation between two source registers and put the result into target register216// A: target register217// B: source register 1218// C: source register 2219LOP_ADD,220LOP_SUB,221LOP_MUL,222LOP_DIV,223LOP_MOD,224LOP_POW,225226// ADDK, SUBK, MULK, DIVK, MODK, POWK: compute arithmetic operation between the source register and a constant and put the result into target register227// A: target register228// B: source register229// C: constant table index (0..255); must refer to a number230LOP_ADDK,231LOP_SUBK,232LOP_MULK,233LOP_DIVK,234LOP_MODK,235LOP_POWK,236237// AND, OR: perform `and` or `or` operation (selecting first or second register based on whether the first one is truthy) and put the result into target register238// A: target register239// B: source register 1240// C: source register 2241LOP_AND,242LOP_OR,243244// ANDK, ORK: perform `and` or `or` operation (selecting source register or constant based on whether the source register is truthy) and put the result into target register245// A: target register246// B: source register247// C: constant table index (0..255)248LOP_ANDK,249LOP_ORK,250251// CONCAT: concatenate all strings between B and C (inclusive) and put the result into A252// A: target register253// B: source register start254// C: source register end255LOP_CONCAT,256257// NOT, MINUS, LENGTH: compute unary operation for source register and put the result into target register258// A: target register259// B: source register260LOP_NOT,261LOP_MINUS,262LOP_LENGTH,263264// NEWTABLE: create table in target register265// A: target register266// B: table size, stored as 0 for v=0 and ceil(log2(v))+1 for v!=0267// AUX: array size268LOP_NEWTABLE,269270// DUPTABLE: duplicate table using the constant table template to target register271// A: target register272// D: constant table index (0..32767)273LOP_DUPTABLE,274275// SETLIST: set a list of values to table in target register276// A: target register277// B: source register start278// C: value count + 1, or 0 to use all values up to top (MULTRET)279// AUX: table index to start from280LOP_SETLIST,281282// FORNPREP: prepare a numeric for loop, jump over the loop if first iteration doesn't need to run283// A: target register; numeric for loops assume a register layout [limit, step, index, variable]284// D: jump offset (-32768..32767)285// limit/step are immutable, index isn't visible to user code since it's copied into variable286LOP_FORNPREP,287288// FORNLOOP: adjust loop variables for one iteration, jump back to the loop header if loop needs to continue289// A: target register; see FORNPREP for register layout290// D: jump offset (-32768..32767)291LOP_FORNLOOP,292293// FORGLOOP: adjust loop variables for one iteration of a generic for loop, jump back to the loop header if loop needs to continue294// A: target register; generic for loops assume a register layout [generator, state, index, variables...]295// D: jump offset (-32768..32767)296// AUX: variable count (1..255) in the low 8 bits, high bit indicates whether to use ipairs-style traversal in the fast path297// loop variables are adjusted by calling generator(state, index) and expecting it to return a tuple that's copied to the user variables298// the first variable is then copied into index; generator/state are immutable, index isn't visible to user code299LOP_FORGLOOP,300301// FORGPREP_INEXT: prepare FORGLOOP with 2 output variables (no AUX encoding), assuming generator is luaB_inext, and jump to FORGLOOP302// A: target register (see FORGLOOP for register layout)303// D: jump offset (-32768..32767)304LOP_FORGPREP_INEXT,305306// FASTCALL3: perform a fast call of a built-in function using 3 register arguments307// A: builtin function id (see LuauBuiltinFunction)308// B: source argument register309// C: jump offset to get to following CALL310// AUX: source register 2 in least-significant byte311// AUX: source register 3 in second least-significant byte312LOP_FASTCALL3,313314// FORGPREP_NEXT: prepare FORGLOOP with 2 output variables (no AUX encoding), assuming generator is luaB_next, and jump to FORGLOOP315// A: target register (see FORGLOOP for register layout)316// D: jump offset (-32768..32767)317LOP_FORGPREP_NEXT,318319// NATIVECALL: start executing new function in native code320// this is a pseudo-instruction that is never emitted by bytecode compiler, but can be constructed at runtime to accelerate native code dispatch321LOP_NATIVECALL,322323// GETVARARGS: copy variables into the target register from vararg storage for current function324// A: target register325// B: variable count + 1, or 0 to copy all variables and adjust top (MULTRET)326LOP_GETVARARGS,327328// DUPCLOSURE: create closure from a pre-created function object (reusing it unless environments diverge)329// A: target register330// D: constant table index (0..32767)331LOP_DUPCLOSURE,332333// PREPVARARGS: prepare stack for variadic functions so that GETVARARGS works correctly334// A: number of fixed arguments335LOP_PREPVARARGS,336337// LOADKX: sets register to an entry from the constant table from the proto (number/string)338// A: target register339// AUX: constant table index340LOP_LOADKX,341342// JUMPX: jumps to the target offset; like JUMPBACK, supports interruption343// E: jump offset (-2^23..2^23; 0 means "next instruction" aka "don't jump")344LOP_JUMPX,345346// FASTCALL: perform a fast call of a built-in function347// A: builtin function id (see LuauBuiltinFunction)348// C: jump offset to get to following CALL349// FASTCALL is followed by one of (GETIMPORT, MOVE, GETUPVAL) instructions and by CALL instruction350// This is necessary so that if FASTCALL can't perform the call inline, it can continue normal execution351// If FASTCALL *can* perform the call, it jumps over the instructions *and* over the next CALL352// Note that FASTCALL will read the actual call arguments, such as argument/result registers and counts, from the CALL instruction353LOP_FASTCALL,354355// COVERAGE: update coverage information stored in the instruction356// E: hit count for the instruction (0..2^23-1)357// The hit count is incremented by VM every time the instruction is executed, and saturates at 2^23-1358LOP_COVERAGE,359360// CAPTURE: capture a local or an upvalue as an upvalue into a newly created closure; only valid after NEWCLOSURE361// A: capture type, see LuauCaptureType362// B: source register (for VAL/REF) or upvalue index (for UPVAL/UPREF)363LOP_CAPTURE,364365// SUBRK, DIVRK: compute arithmetic operation between the constant and a source register and put the result into target register366// A: target register367// B: constant table index (0..255); must refer to a number368// C: source register369LOP_SUBRK,370LOP_DIVRK,371372// FASTCALL1: perform a fast call of a built-in function using 1 register argument373// A: builtin function id (see LuauBuiltinFunction)374// B: source argument register375// C: jump offset to get to following CALL376LOP_FASTCALL1,377378// FASTCALL2: perform a fast call of a built-in function using 2 register arguments379// A: builtin function id (see LuauBuiltinFunction)380// B: source argument register381// C: jump offset to get to following CALL382// AUX: source register 2 in least-significant byte383LOP_FASTCALL2,384385// FASTCALL2K: perform a fast call of a built-in function using 1 register argument and 1 constant argument386// A: builtin function id (see LuauBuiltinFunction)387// B: source argument register388// C: jump offset to get to following CALL389// AUX: constant index390LOP_FASTCALL2K,391392// FORGPREP: prepare loop variables for a generic for loop, jump to the loop backedge unconditionally393// A: target register; generic for loops assume a register layout [generator, state, index, variables...]394// D: jump offset (-32768..32767)395LOP_FORGPREP,396397// JUMPXEQKNIL, JUMPXEQKB: jumps to target offset if the comparison with constant is true (or false, see AUX)398// A: source register 1399// D: jump offset (-32768..32767; 1 means "next instruction" aka "don't jump")400// AUX: constant value (for boolean) in low bit, NOT flag (that flips comparison result) in high bit401LOP_JUMPXEQKNIL,402LOP_JUMPXEQKB,403404// JUMPXEQKN, JUMPXEQKS: jumps to target offset if the comparison with constant is true (or false, see AUX)405// A: source register 1406// D: jump offset (-32768..32767; 1 means "next instruction" aka "don't jump")407// AUX: constant table index in low 24 bits, NOT flag (that flips comparison result) in high bit408LOP_JUMPXEQKN,409LOP_JUMPXEQKS,410411// IDIV: compute floor division between two source registers and put the result into target register412// A: target register413// B: source register 1414// C: source register 2415LOP_IDIV,416417// IDIVK compute floor division between the source register and a constant and put the result into target register418// A: target register419// B: source register420// C: constant table index (0..255)421LOP_IDIVK,422423// Enum entry for number of opcodes, not a valid opcode by itself!424LOP__COUNT425};426427// Bytecode instruction header: it's always a 32-bit integer, with low byte (first byte in little endian) containing the opcode428// Some instruction types require more data and have more 32-bit integers following the header429#define LUAU_INSN_OP(insn) ((insn) & 0xff)430431// ABC encoding: three 8-bit values, containing registers or small numbers432#define LUAU_INSN_A(insn) (((insn) >> 8) & 0xff)433#define LUAU_INSN_B(insn) (((insn) >> 16) & 0xff)434#define LUAU_INSN_C(insn) (((insn) >> 24) & 0xff)435436// AD encoding: one 8-bit value, one signed 16-bit value437#define LUAU_INSN_D(insn) (int32_t(insn) >> 16)438439// E encoding: one signed 24-bit value440#define LUAU_INSN_E(insn) (int32_t(insn) >> 8)441442// Auxiliary AB: two 8-bit values, containing registers or small numbers443// Used in FASTCALL3444#define LUAU_INSN_AUX_A(aux) ((aux) & 0xff)445#define LUAU_INSN_AUX_B(aux) (((aux) >> 8) & 0xff)446447// Auxiliary KV: unsigned 24-bit constant index448// Used in LOP_JUMPXEQK* instructions449#define LUAU_INSN_AUX_KV(aux) ((aux) & 0xffffff)450451// Auxiliary KB: 1-bit constant value452// Used in LOP_JUMPXEQKB instruction453#define LUAU_INSN_AUX_KB(aux) ((aux) & 0x1)454455// Auxiliary NOT: 1-bit negation flag456// Used in LOP_JUMPXEQK* instructions457#define LUAU_INSN_AUX_NOT(aux) ((aux) >> 31)458459// Bytecode tags, used internally for bytecode encoded as a string460enum LuauBytecodeTag461{462// Bytecode version; runtime supports [MIN, MAX], compiler emits TARGET by default but may emit a higher version when flags are enabled463LBC_VERSION_MIN = 3,464LBC_VERSION_MAX = 8,465LBC_VERSION_TARGET = 6,466// Type encoding version467LBC_TYPE_VERSION_MIN = 1,468LBC_TYPE_VERSION_MAX = 3,469LBC_TYPE_VERSION_TARGET = 3,470// Types of constant table entries471LBC_CONSTANT_NIL = 0,472LBC_CONSTANT_BOOLEAN,473LBC_CONSTANT_NUMBER,474LBC_CONSTANT_STRING,475LBC_CONSTANT_IMPORT,476LBC_CONSTANT_TABLE,477LBC_CONSTANT_CLOSURE,478LBC_CONSTANT_VECTOR,479LBC_CONSTANT_TABLE_WITH_CONSTANTS,480LBC_CONSTANT_INTEGER,481};482483// Type table tags484enum LuauBytecodeType485{486LBC_TYPE_NIL = 0,487LBC_TYPE_BOOLEAN,488LBC_TYPE_NUMBER,489LBC_TYPE_STRING,490LBC_TYPE_TABLE,491LBC_TYPE_FUNCTION,492LBC_TYPE_THREAD,493LBC_TYPE_USERDATA,494LBC_TYPE_VECTOR,495LBC_TYPE_BUFFER,496LBC_TYPE_INTEGER,497498LBC_TYPE_ANY = 15,499500LBC_TYPE_TAGGED_USERDATA_BASE = 64,501LBC_TYPE_TAGGED_USERDATA_END = 64 + 32,502503LBC_TYPE_OPTIONAL_BIT = 1 << 7,504505LBC_TYPE_INVALID = 256,506};507508// Builtin function ids, used in LOP_FASTCALL509enum LuauBuiltinFunction510{511LBF_NONE = 0,512513// assert()514LBF_ASSERT,515516// math.517LBF_MATH_ABS,518LBF_MATH_ACOS,519LBF_MATH_ASIN,520LBF_MATH_ATAN2,521LBF_MATH_ATAN,522LBF_MATH_CEIL,523LBF_MATH_COSH,524LBF_MATH_COS,525LBF_MATH_DEG,526LBF_MATH_EXP,527LBF_MATH_FLOOR,528LBF_MATH_FMOD,529LBF_MATH_FREXP,530LBF_MATH_LDEXP,531LBF_MATH_LOG10,532LBF_MATH_LOG,533LBF_MATH_MAX,534LBF_MATH_MIN,535LBF_MATH_MODF,536LBF_MATH_POW,537LBF_MATH_RAD,538LBF_MATH_SINH,539LBF_MATH_SIN,540LBF_MATH_SQRT,541LBF_MATH_TANH,542LBF_MATH_TAN,543544// bit32.545LBF_BIT32_ARSHIFT,546LBF_BIT32_BAND,547LBF_BIT32_BNOT,548LBF_BIT32_BOR,549LBF_BIT32_BXOR,550LBF_BIT32_BTEST,551LBF_BIT32_EXTRACT,552LBF_BIT32_LROTATE,553LBF_BIT32_LSHIFT,554LBF_BIT32_REPLACE,555LBF_BIT32_RROTATE,556LBF_BIT32_RSHIFT,557558// type()559LBF_TYPE,560561// string.562LBF_STRING_BYTE,563LBF_STRING_CHAR,564LBF_STRING_LEN,565566// typeof()567LBF_TYPEOF,568569// string.570LBF_STRING_SUB,571572// math.573LBF_MATH_CLAMP,574LBF_MATH_SIGN,575LBF_MATH_ROUND,576577// raw*578LBF_RAWSET,579LBF_RAWGET,580LBF_RAWEQUAL,581582// table.583LBF_TABLE_INSERT,584LBF_TABLE_UNPACK,585586// vector ctor587LBF_VECTOR,588589// bit32.count590LBF_BIT32_COUNTLZ,591LBF_BIT32_COUNTRZ,592593// select(_, ...)594LBF_SELECT_VARARG,595596// rawlen597LBF_RAWLEN,598599// bit32.extract(_, k, k)600LBF_BIT32_EXTRACTK,601602// get/setmetatable603LBF_GETMETATABLE,604LBF_SETMETATABLE,605606// tonumber/tostring607LBF_TONUMBER,608LBF_TOSTRING,609610// bit32.byteswap(n)611LBF_BIT32_BYTESWAP,612613// buffer.614LBF_BUFFER_READI8,615LBF_BUFFER_READU8,616LBF_BUFFER_WRITEU8,617LBF_BUFFER_READI16,618LBF_BUFFER_READU16,619LBF_BUFFER_WRITEU16,620LBF_BUFFER_READI32,621LBF_BUFFER_READU32,622LBF_BUFFER_WRITEU32,623LBF_BUFFER_READF32,624LBF_BUFFER_WRITEF32,625LBF_BUFFER_READF64,626LBF_BUFFER_WRITEF64,627628// vector.629LBF_VECTOR_MAGNITUDE,630LBF_VECTOR_NORMALIZE,631LBF_VECTOR_CROSS,632LBF_VECTOR_DOT,633LBF_VECTOR_FLOOR,634LBF_VECTOR_CEIL,635LBF_VECTOR_ABS,636LBF_VECTOR_SIGN,637LBF_VECTOR_CLAMP,638LBF_VECTOR_MIN,639LBF_VECTOR_MAX,640641// math.lerp642LBF_MATH_LERP,643644// vector.lerp645LBF_VECTOR_LERP,646647// math.648LBF_MATH_ISNAN,649LBF_MATH_ISINF,650LBF_MATH_ISFINITE,651652// integer653LBF_INTEGER_CREATE,654LBF_INTEGER_TONUMBER,655LBF_INTEGER_NEG,656LBF_INTEGER_ADD,657LBF_INTEGER_SUB,658LBF_INTEGER_MUL,659LBF_INTEGER_DIV,660LBF_INTEGER_MIN,661LBF_INTEGER_MAX,662LBF_INTEGER_REM,663LBF_INTEGER_IDIV,664LBF_INTEGER_UDIV,665LBF_INTEGER_UREM,666LBF_INTEGER_MOD,667LBF_INTEGER_CLAMP,668LBF_INTEGER_BAND,669LBF_INTEGER_BOR,670LBF_INTEGER_BNOT,671LBF_INTEGER_BXOR,672LBF_INTEGER_LT,673LBF_INTEGER_LE,674LBF_INTEGER_ULT,675LBF_INTEGER_ULE,676LBF_INTEGER_GT,677LBF_INTEGER_GE,678LBF_INTEGER_UGT,679LBF_INTEGER_UGE,680LBF_INTEGER_LSHIFT,681LBF_INTEGER_RSHIFT,682LBF_INTEGER_ARSHIFT,683LBF_INTEGER_LROTATE,684LBF_INTEGER_RROTATE,685LBF_INTEGER_EXTRACT,686LBF_INTEGER_BTEST,687LBF_INTEGER_COUNTRZ,688LBF_INTEGER_COUNTLZ,689LBF_INTEGER_BSWAP,690};691692// Capture type, used in LOP_CAPTURE693enum LuauCaptureType694{695LCT_VAL = 0,696LCT_REF,697LCT_UPVAL,698};699700// Proto flag bitmask, stored in Proto::flags701enum LuauProtoFlag702{703// used to tag main proto for modules with --!native704LPF_NATIVE_MODULE = 1 << 0,705// used to tag individual protos as not profitable to compile natively706LPF_NATIVE_COLD = 1 << 1,707// used to tag main proto for modules that have at least one function with native attribute708LPF_NATIVE_FUNCTION = 1 << 2,709};710711712