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

Function luaK_setlist

freebsd/contrib/openzfs/module/lua/lcode.c:870–883  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

868
869
870void luaK_setlist (FuncState *fs, int base, int nelems, int tostore) {
871 int c = (nelems - 1)/LFIELDS_PER_FLUSH + 1;
872 int b = (tostore == LUA_MULTRET) ? 0 : tostore;
873 lua_assert(tostore != 0);
874 if (c <= MAXARG_C)
875 luaK_codeABC(fs, OP_SETLIST, base, b, c);
876 else if (c <= MAXARG_Ax) {
877 luaK_codeABC(fs, OP_SETLIST, base, b, 0);
878 codeextraarg(fs, c);
879 }
880 else
881 luaX_syntaxerror(fs->ls, "constructor too long");
882 fs->freereg = base + 1; /* free registers with list values */
883}
884/* END CSTYLED */

Callers 2

closelistfieldFunction · 0.70
lastlistfieldFunction · 0.70

Calls 3

codeextraargFunction · 0.85
luaK_codeABCFunction · 0.70
luaX_syntaxerrorFunction · 0.70

Tested by

no test coverage detected