** 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". */
| 449 | ** instruction with "extra argument". |
| 450 | */ |
| 451 | static 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 | /* |
no test coverage detected