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

Function luaK_setlist

src/Chain/libraries/glua/lcode.cpp:941–954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

939
940
941void luaK_setlist(FuncState *fs, int base, int nelems, int tostore) {
942 int c = (nelems - 1) / LFIELDS_PER_FLUSH + 1;
943 int b = (tostore == LUA_MULTRET) ? 0 : tostore;
944 lua_assert(tostore != 0);
945 if (c <= MAXARG_C)
946 luaK_codeABC(fs, OP_SETLIST, base, b, c);
947 else if (c <= MAXARG_Ax) {
948 luaK_codeABC(fs, OP_SETLIST, base, b, 0);
949 codeextraarg(fs, c);
950 }
951 else
952 luaX_syntaxerror(fs->ls, "constructor too long");
953 fs->freereg = base + 1; /* free registers with list values */
954}
955

Callers 2

closelistfieldFunction · 0.85
lastlistfieldFunction · 0.85

Calls 3

luaK_codeABCFunction · 0.85
codeextraargFunction · 0.85
luaX_syntaxerrorFunction · 0.85

Tested by

no test coverage detected