MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / lastlistfield

Function lastlistfield

src/Chain/libraries/glua/lparser.cpp:706–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

704
705
706static void lastlistfield(FuncState *fs, struct ConsControl *cc) {
707 if (cc->tostore == 0) return;
708 if (hasmultret(cc->v.k)) {
709 luaK_setmultret(fs, &cc->v);
710 luaK_setlist(fs, cc->t->u.info, cc->na, LUA_MULTRET);
711 cc->na--; /* do not count last expression (unknown number of elements) */
712 }
713 else {
714 if (cc->v.k != VVOID)
715 luaK_exp2nextreg(fs, &cc->v);
716 luaK_setlist(fs, cc->t->u.info, cc->na, cc->tostore);
717 }
718}
719
720
721static 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