** codes instruction to create new closure in parent function. ** The OP_CLOSURE instruction uses the last available register, ** so that, if it invokes the GC, the GC knows which registers ** are in use at that time. */
| 702 | |
| 703 | */ |
| 704 | static void codeclosure (LexState *ls, expdesc *v) { |
| 705 | FuncState *fs = ls->fs->prev; |
| 706 | init_exp(v, VRELOC, luaK_codeABx(fs, OP_CLOSURE, 0, fs->np - 1)); |
| 707 | luaK_exp2nextreg(fs, v); /* fix it at the last register */ |
| 708 | } |
| 709 | |
| 710 | |
| 711 | static void open_func (LexState *ls, FuncState *fs, BlockCnt *bl) { |
no test coverage detected