| 7870 | |
| 7871 | |
| 7872 | static void leaveblock (FuncState *fs) { |
| 7873 | BlockCnt *bl = fs->bl; |
| 7874 | fs->bl = bl->previous; |
| 7875 | removevars(fs->ls, bl->nactvar); |
| 7876 | if (bl->upval) |
| 7877 | luaK_codeABC(fs, OP_CLOSE, bl->nactvar, 0, 0); |
| 7878 | /* a block either controls scope or breaks (never both) */ |
| 7879 | lua_assert(!bl->isbreakable || !bl->upval); |
| 7880 | lua_assert(bl->nactvar == fs->nactvar); |
| 7881 | fs->freereg = fs->nactvar; /* free registers */ |
| 7882 | luaK_patchtohere(fs, bl->breaklist); |
| 7883 | } |
| 7884 | |
| 7885 | |
| 7886 | static void pushclosure (LexState *ls, FuncState *func, expdesc *v) { |
no test coverage detected