** codes instruction to create new closure in parent function. ** The OP_CLOSURE instruction must use the last available register, ** so that, if it invokes the GC, the GC knows which registers ** are in use at that time. */
| 535 | ** are in use at that time. |
| 536 | */ |
| 537 | static void codeclosure(LexState *ls, expdesc *v) |
| 538 | { |
| 539 | FuncState *fs = ls->fs->prev; |
| 540 | init_exp(v, VRELOCABLE, luaK_codeABx(fs, OP_CLOSURE, 0, fs->np - 1)); |
| 541 | luaK_exp2nextreg(fs, v); /* fix it at the last register */ |
| 542 | } |
| 543 | |
| 544 | static void open_func(LexState *ls, FuncState *fs, BlockCnt *bl) |
| 545 | { |
no test coverage detected