MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / close_func

Function close_func

lib/lua/src/lparser.c:756–774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

754
755
756static void close_func (LexState *ls) {
757 lua_State *L = ls->L;
758 FuncState *fs = ls->fs;
759 Proto *f = fs->f;
760 luaK_ret(fs, luaY_nvarstack(fs), 0); /* final return */
761 leaveblock(fs);
762 lua_assert(fs->bl == NULL);
763 luaK_finish(fs);
764 luaM_shrinkvector(L, f->code, f->sizecode, fs->pc, Instruction);
765 luaM_shrinkvector(L, f->lineinfo, f->sizelineinfo, fs->pc, ls_byte);
766 luaM_shrinkvector(L, f->abslineinfo, f->sizeabslineinfo,
767 fs->nabslineinfo, AbsLineInfo);
768 luaM_shrinkvector(L, f->k, f->sizek, fs->nk, TValue);
769 luaM_shrinkvector(L, f->p, f->sizep, fs->np, Proto *);
770 luaM_shrinkvector(L, f->locvars, f->sizelocvars, fs->ndebugvars, LocVar);
771 luaM_shrinkvector(L, f->upvalues, f->sizeupvalues, fs->nups, Upvaldesc);
772 ls->fs = fs->prev;
773 luaC_checkGC(L);
774}
775
776
777

Callers 2

bodyFunction · 0.85
mainfuncFunction · 0.85

Calls 4

luaK_retFunction · 0.85
luaY_nvarstackFunction · 0.85
leaveblockFunction · 0.85
luaK_finishFunction · 0.85

Tested by

no test coverage detected