MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / leaveblock

Function leaveblock

lua/lparser.c:327–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325
326
327static void leaveblock (FuncState *fs) {
328 BlockCnt *bl = fs->bl;
329 fs->bl = bl->previous;
330 removevars(fs->ls, bl->nactvar);
331 if (bl->upval)
332 luaK_codeABC(fs, OP_CLOSE, bl->nactvar, 0, 0);
333 /* a block either controls scope or breaks (never both) */
334 lua_assert(!bl->isbreakable || !bl->upval);
335 lua_assert(bl->nactvar == fs->nactvar);
336 fs->freereg = fs->nactvar; /* free registers */
337 luaK_patchtohere(fs, bl->breaklist);
338}
339
340
341static void pushclosure (LexState *ls, FuncState *func, expdesc *v) {

Callers 5

blockFunction · 0.85
whilestatFunction · 0.85
repeatstatFunction · 0.85
forbodyFunction · 0.85
forstatFunction · 0.85

Calls 3

removevarsFunction · 0.85
luaK_codeABCFunction · 0.85
luaK_patchtohereFunction · 0.85

Tested by

no test coverage detected