** 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". */
| 344 | ** instruction with "extra argument". |
| 345 | */ |
| 346 | int luaK_codek (FuncState *fs, int reg, int k) { |
| 347 | if (k <= MAXARG_Bx) |
| 348 | return luaK_codeABx(fs, OP_LOADK, reg, k); |
| 349 | else { |
| 350 | int p = luaK_codeABx(fs, OP_LOADKX, reg, 0); |
| 351 | codeextraarg(fs, k); |
| 352 | return p; |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | |
| 357 | /* |
no test coverage detected