MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / luaK_codek

Function luaK_codek

lib/lua/src/lcode.c:451–459  ·  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

449** instruction with "extra argument".
450*/
451static int luaK_codek (FuncState *fs, int reg, int k) {
452 if (k <= MAXARG_Bx)
453 return luaK_codeABx(fs, OP_LOADK, reg, k);
454 else {
455 int p = luaK_codeABx(fs, OP_LOADKX, reg, 0);
456 codeextraarg(fs, k);
457 return p;
458 }
459}
460
461
462/*

Callers 3

luaK_intFunction · 0.85
luaK_floatFunction · 0.85
discharge2regFunction · 0.85

Calls 2

luaK_codeABxFunction · 0.85
codeextraargFunction · 0.85

Tested by

no test coverage detected