MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / lastlistfield

Function lastlistfield

Source/Misc/lua/src/lua.c:8051–8063  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8049
8050
8051static void lastlistfield (FuncState *fs, struct ConsControl *cc) {
8052if (cc->tostore == 0) return;
8053if (hasmultret(cc->v.k)) {
8054luaK_setmultret(fs, &cc->v);
8055luaK_setlist(fs, cc->t->u.s.info, cc->na, LUA_MULTRET);
8056cc->na--; /* do not count last expression (unknown number of elements) */
8057}
8058else {
8059if (cc->v.k != VVOID)
8060luaK_exp2nextreg(fs, &cc->v);
8061luaK_setlist(fs, cc->t->u.s.info, cc->na, cc->tostore);
8062}
8063}
8064
8065
8066static void listfield (LexState *ls, struct ConsControl *cc) {

Callers 1

constructorFunction · 0.85

Calls 2

luaK_setlistFunction · 0.85
luaK_exp2nextregFunction · 0.85

Tested by

no test coverage detected