| 1790 | |
| 1791 | |
| 1792 | void luaK_settablesize (FuncState *fs, int pc, int ra, int asize, int hsize) { |
| 1793 | Instruction *inst = &fs->f->code[pc]; |
| 1794 | int rb = (hsize != 0) ? luaO_ceillog2(hsize) + 1 : 0; /* hash size */ |
| 1795 | int extra = asize / (MAXARG_C + 1); /* higher bits of array size */ |
| 1796 | int rc = asize % (MAXARG_C + 1); /* lower bits of array size */ |
| 1797 | int k = (extra > 0); /* true iff needs extra argument */ |
| 1798 | *inst = CREATE_ABCk(OP_NEWTABLE, ra, rb, rc, k); |
| 1799 | *(inst + 1) = CREATE_Ax(OP_EXTRAARG, extra); |
| 1800 | } |
| 1801 | |
| 1802 | |
| 1803 | /* |
no test coverage detected