MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaK_codek

Function luaK_codek

third-party/lua-5.5.0/src/lcode.c:461–469  ·  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

459** instruction with "extra argument".
460*/
461static int luaK_codek (FuncState *fs, int reg, int k) {
462 if (k <= MAXARG_Bx)
463 return luaK_codeABx(fs, OP_LOADK, reg, k);
464 else {
465 int p = luaK_codeABx(fs, OP_LOADKX, reg, 0);
466 codeextraarg(fs, k);
467 return p;
468 }
469}
470
471
472/*

Callers 3

luaK_intFunction · 0.70
luaK_floatFunction · 0.70
discharge2regFunction · 0.70

Calls 2

luaK_codeABxFunction · 0.70
codeextraargFunction · 0.70

Tested by

no test coverage detected