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