MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / close_func

Function close_func

Source/Misc/lua/src/lua.c:7932–7956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7930
7931
7932static void close_func (LexState *ls) {
7933lua_State *L = ls->L;
7934FuncState *fs = ls->fs;
7935Proto *f = fs->f;
7936removevars(ls, 0);
7937luaK_ret(fs, 0, 0); /* final return */
7938luaM_reallocvector(L, f->code, f->sizecode, fs->pc, Instruction);
7939f->sizecode = fs->pc;
7940luaM_reallocvector(L, f->lineinfo, f->sizelineinfo, fs->pc, int);
7941f->sizelineinfo = fs->pc;
7942luaM_reallocvector(L, f->k, f->sizek, fs->nk, TValue);
7943f->sizek = fs->nk;
7944luaM_reallocvector(L, f->p, f->sizep, fs->np, Proto *);
7945f->sizep = fs->np;
7946luaM_reallocvector(L, f->locvars, f->sizelocvars, fs->nlocvars, LocVar);
7947f->sizelocvars = fs->nlocvars;
7948luaM_reallocvector(L, f->upvalues, f->sizeupvalues, f->nups, TString *);
7949f->sizeupvalues = f->nups;
7950lua_assert(luaG_checkcode(f));
7951lua_assert(fs->bl == NULL);
7952ls->fs = fs->prev;
7953L->top -= 2; /* remove table and prototype from the stack */
7954/* last token read was anchored in defunct function; must reanchor it */
7955if (fs) anchor_token(ls);
7956}
7957
7958
7959Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, const char *name) {

Callers 2

luaY_parserFunction · 0.85
bodyFunction · 0.85

Calls 4

removevarsFunction · 0.85
luaK_retFunction · 0.85
luaG_checkcodeFunction · 0.85
anchor_tokenFunction · 0.85

Tested by

no test coverage detected