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

Function lastlistfield

lua/lparser.c:506–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

504
505
506static void lastlistfield (FuncState *fs, struct ConsControl *cc) {
507 if (cc->tostore == 0) return;
508 if (hasmultret(cc->v.k)) {
509 luaK_setmultret(fs, &cc->v);
510 luaK_setlist(fs, cc->t->u.s.info, cc->na, LUA_MULTRET);
511 cc->na--; /* do not count last expression (unknown number of elements) */
512 }
513 else {
514 if (cc->v.k != VVOID)
515 luaK_exp2nextreg(fs, &cc->v);
516 luaK_setlist(fs, cc->t->u.s.info, cc->na, cc->tostore);
517 }
518}
519
520
521static 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