| 865 | |
| 866 | |
| 867 | void 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 |
no test coverage detected