| 868 | |
| 869 | |
| 870 | void 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 */ |
no test coverage detected