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

Function adjustlocalvars

third-party/lua-5.4.6/src/lparser.c:311–321  ·  view source on GitHub ↗

** Start the scope for the last 'nvars' created variables. */

Source from the content-addressed store, hash-verified

309** Start the scope for the last 'nvars' created variables.
310*/
311static void adjustlocalvars (LexState *ls, int nvars) {
312 FuncState *fs = ls->fs;
313 int reglevel = luaY_nvarstack(fs);
314 int i;
315 for (i = 0; i < nvars; i++) {
316 int vidx = fs->nactvar++;
317 Vardesc *var = getlocalvardesc(fs, vidx);
318 var->vd.ridx = reglevel++;
319 var->vd.pidx = registerlocalvar(ls, fs, var->vd.name);
320 }
321}
322
323
324/*

Callers 7

parlistFunction · 0.70
bodyFunction · 0.70
forbodyFunction · 0.70
fornumFunction · 0.70
forlistFunction · 0.70
localfuncFunction · 0.70
localstatFunction · 0.70

Calls 3

luaY_nvarstackFunction · 0.70
getlocalvardescFunction · 0.70
registerlocalvarFunction · 0.70

Tested by

no test coverage detected