MCPcopy Create free account
hub / github.com/Tencent/sluaunreal / luaK_codek

Function luaK_codek

Plugins/slua_unreal/External/lua/lcode.cpp:344–352  ·  view source on GitHub ↗

** Emit a "load constant" instruction, using either 'OP_LOADK' ** (if constant index 'k' fits in 18 bits) or an 'OP_LOADKX' ** instruction with "extra argument". */

Source from the content-addressed store, hash-verified

342** instruction with "extra argument".
343*/
344int luaK_codek (FuncState *fs, int reg, int k) {
345 if (k <= MAXARG_Bx)
346 return luaK_codeABx(fs, OP_LOADK, reg, k);
347 else {
348 int p = luaK_codeABx(fs, OP_LOADKX, reg, 0);
349 codeextraarg(fs, k);
350 return p;
351 }
352}
353
354
355/*

Callers 2

discharge2regFunction · 0.85
fornumFunction · 0.85

Calls 2

luaK_codeABxFunction · 0.85
codeextraargFunction · 0.85

Tested by

no test coverage detected