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

Function lastlistfield

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

Source from the content-addressed store, hash-verified

477
478
479static void lastlistfield (FuncState *fs, struct ConsControl *cc) {
480 if (cc->tostore == 0) return;
481 if (hasmultret(cc->v.k)) {
482 luaK_setmultret(fs, &cc->v);
483 luaK_setlist(fs, cc->t->u.s.info, cc->na, LUA_MULTRET);
484 cc->na--; /* do not count last expression (unknown number of elements) */
485 }
486 else {
487 if (cc->v.k != VVOID)
488 luaK_exp2nextreg(fs, &cc->v);
489 luaK_setlist(fs, cc->t->u.s.info, cc->na, cc->tostore);
490 }
491}
492
493
494static 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