MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / localfunc

Function localfunc

lua/lparser.c:1225–1236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1223
1224
1225static void localfunc (LexState *ls) {
1226 expdesc v, b;
1227 FuncState *fs = ls->fs;
1228 new_localvar(ls, str_checkname(ls), 0);
1229 init_exp(&v, VLOCAL, fs->freereg);
1230 luaK_reserveregs(fs, 1);
1231 adjustlocalvars(ls, 1);
1232 body(ls, &b, 0, ls->linenumber);
1233 luaK_storevar(fs, &v, &b);
1234 /* debug information will only see the variable after this point! */
1235 getlocvar(fs, fs->nactvar - 1).startpc = fs->pc;
1236}
1237
1238
1239static void declarestat (LexState *ls) {

Callers 1

statementFunction · 0.85

Calls 7

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

Tested by

no test coverage detected