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

Function lastlistfield

freebsd/contrib/openzfs/module/lua/lparser.c:688–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

686
687
688static void lastlistfield (FuncState *fs, struct ConsControl *cc) {
689 if (cc->tostore == 0) return;
690 if (hasmultret(cc->v.k)) {
691 luaK_setmultret(fs, &cc->v);
692 luaK_setlist(fs, cc->t->u.info, cc->na, LUA_MULTRET);
693 cc->na--; /* do not count last expression (unknown number of elements) */
694 }
695 else {
696 if (cc->v.k != VVOID)
697 luaK_exp2nextreg(fs, &cc->v);
698 luaK_setlist(fs, cc->t->u.info, cc->na, cc->tostore);
699 }
700}
701
702
703static void listfield (LexState *ls, struct ConsControl *cc) {

Callers 1

constructorFunction · 0.70

Calls 2

luaK_setlistFunction · 0.70
luaK_exp2nextregFunction · 0.70

Tested by

no test coverage detected