MCPcopy Create free account
hub / github.com/F-Stack/f-stack / localfunc

Function localfunc

app/redis-6.2.6/deps/lua/src/lparser.c:1169–1180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1167
1168
1169static void localfunc (LexState *ls) {
1170 expdesc v, b;
1171 FuncState *fs = ls->fs;
1172 new_localvar(ls, str_checkname(ls), 0);
1173 init_exp(&v, VLOCAL, fs->freereg);
1174 luaK_reserveregs(fs, 1);
1175 adjustlocalvars(ls, 1);
1176 body(ls, &b, 0, ls->linenumber);
1177 luaK_storevar(fs, &v, &b);
1178 /* debug information will only see the variable after this point! */
1179 getlocvar(fs, fs->nactvar - 1).startpc = fs->pc;
1180}
1181
1182
1183static void localstat (LexState *ls) {

Callers 1

statementFunction · 0.70

Calls 8

getlocvarFunction · 0.85
new_localvarFunction · 0.70
str_checknameFunction · 0.70
init_expFunction · 0.70
luaK_reserveregsFunction · 0.70
adjustlocalvarsFunction · 0.70
bodyFunction · 0.70
luaK_storevarFunction · 0.70

Tested by

no test coverage detected