** 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". */
| 457 | ** instruction with "extra argument". |
| 458 | */ |
| 459 | static int luaK_codek (FuncState *fs, int reg, int k) { |
| 460 | if (k <= MAXARG_Bx) |
| 461 | return luaK_codeABx(fs, OP_LOADK, reg, k); |
| 462 | else { |
| 463 | int p = luaK_codeABx(fs, OP_LOADKX, reg, 0); |
| 464 | codeextraarg(fs, k); |
| 465 | return p; |
| 466 | } |
| 467 | } |
| 468 | |
| 469 | |
| 470 | /* |
no test coverage detected