MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaK_setlist

Function luaK_setlist

third-party/lua-5.2.4/src/lcode.c:867–880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

closelistfieldFunction · 0.70
lastlistfieldFunction · 0.70

Calls 3

luaK_codeABCFunction · 0.70
codeextraargFunction · 0.70
luaX_syntaxerrorFunction · 0.70

Tested by

no test coverage detected