MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / registerlocalvar

Function registerlocalvar

third-party/lua-5.5.0/src/lparser.c:175–187  ·  view source on GitHub ↗

** Register a new local variable in the active 'Proto' (for debug ** information). */

Source from the content-addressed store, hash-verified

173** information).
174*/
175static short registerlocalvar (LexState *ls, FuncState *fs,
176 TString *varname) {
177 Proto *f = fs->f;
178 int oldsize = f->sizelocvars;
179 luaM_growvector(ls->L, f->locvars, fs->ndebugvars, f->sizelocvars,
180 LocVar, SHRT_MAX, "local variables");
181 while (oldsize < f->sizelocvars)
182 f->locvars[oldsize++].varname = NULL;
183 f->locvars[fs->ndebugvars].varname = varname;
184 f->locvars[fs->ndebugvars].startpc = fs->pc;
185 luaC_objbarrier(ls->L, f, varname);
186 return fs->ndebugvars++;
187}
188
189
190/*

Callers 1

adjustlocalvarsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected