| 294 | |
| 295 | |
| 296 | static void leaveblock (FuncState *fs) { |
| 297 | BlockCnt *bl = fs->bl; |
| 298 | fs->bl = bl->previous; |
| 299 | removevars(fs->ls, bl->nactvar); |
| 300 | if (bl->upval) |
| 301 | luaK_codeABC(fs, OP_CLOSE, bl->nactvar, 0, 0); |
| 302 | /* a block either controls scope or breaks (never both) */ |
| 303 | lua_assert(!bl->isbreakable || !bl->upval); |
| 304 | lua_assert(bl->nactvar == fs->nactvar); |
| 305 | fs->freereg = fs->nactvar; /* free registers */ |
| 306 | luaK_patchtohere(fs, bl->breaklist); |
| 307 | } |
| 308 | |
| 309 | |
| 310 | static void pushclosure (LexState *ls, FuncState *func, expdesc *v) { |
no test coverage detected