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