MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / close_func

Function close_func

extlibs/lua/src/lparser.c:737–755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735
736
737static void close_func (LexState *ls) {
738 lua_State *L = ls->L;
739 FuncState *fs = ls->fs;
740 Proto *f = fs->f;
741 luaK_ret(fs, luaY_nvarstack(fs), 0); /* final return */
742 leaveblock(fs);
743 lua_assert(fs->bl == NULL);
744 luaK_finish(fs);
745 luaM_shrinkvector(L, f->code, f->sizecode, fs->pc, Instruction);
746 luaM_shrinkvector(L, f->lineinfo, f->sizelineinfo, fs->pc, ls_byte);
747 luaM_shrinkvector(L, f->abslineinfo, f->sizeabslineinfo,
748 fs->nabslineinfo, AbsLineInfo);
749 luaM_shrinkvector(L, f->k, f->sizek, fs->nk, TValue);
750 luaM_shrinkvector(L, f->p, f->sizep, fs->np, Proto *);
751 luaM_shrinkvector(L, f->locvars, f->sizelocvars, fs->ndebugvars, LocVar);
752 luaM_shrinkvector(L, f->upvalues, f->sizeupvalues, fs->nups, Upvaldesc);
753 ls->fs = fs->prev;
754 luaC_checkGC(L);
755}
756
757
758

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