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

Function close_func

xrepo/packages/l/lua/port/lua/src/lparser.c:755–773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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