MCPcopy Create free account
hub / github.com/DFHack/dfhack / new_localvar

Function new_localvar

depends/lua/src/lparser.c:175–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173
174
175static void new_localvar (LexState *ls, TString *name) {
176 FuncState *fs = ls->fs;
177 Dyndata *dyd = ls->dyd;
178 int reg = registerlocalvar(ls, name);
179 checklimit(fs, dyd->actvar.n + 1 - fs->firstlocal,
180 MAXVARS, "local variables");
181 luaM_growvector(ls->L, dyd->actvar.arr, dyd->actvar.n + 1,
182 dyd->actvar.size, Vardesc, MAX_INT, "local variables");
183 dyd->actvar.arr[dyd->actvar.n++].idx = cast(short, reg);
184}
185
186
187static void new_localvarliteral_ (LexState *ls, const char *name, size_t sz) {

Callers 6

new_localvarliteral_Function · 0.85
parlistFunction · 0.85
fornumFunction · 0.85
forlistFunction · 0.85
localfuncFunction · 0.85
localstatFunction · 0.85

Calls 3

registerlocalvarFunction · 0.85
checklimitFunction · 0.85
castFunction · 0.85

Tested by

no test coverage detected