** 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". */
| 351 | ** instruction with "extra argument". |
| 352 | */ |
| 353 | int luaK_codek (FuncState *fs, int reg, int k) { |
| 354 | if (k <= MAXARG_Bx) |
| 355 | return luaK_codeABx(fs, OP_LOADK, reg, k); |
| 356 | else { |
| 357 | int p = luaK_codeABx(fs, OP_LOADKX, reg, 0); |
| 358 | codeextraarg(fs, k); |
| 359 | return p; |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | |
| 364 | /* |
no test coverage detected