| 1730 | |
| 1731 | |
| 1732 | void luaK_settablesize (FuncState *fs, int pc, int ra, int asize, int hsize) { |
| 1733 | Instruction *inst = &fs->f->code[pc]; |
| 1734 | int rb = (hsize != 0) ? luaO_ceillog2(hsize) + 1 : 0; /* hash size */ |
| 1735 | int extra = asize / (MAXARG_C + 1); /* higher bits of array size */ |
| 1736 | int rc = asize % (MAXARG_C + 1); /* lower bits of array size */ |
| 1737 | int k = (extra > 0); /* true iff needs extra argument */ |
| 1738 | *inst = CREATE_ABCk(OP_NEWTABLE, ra, rb, rc, k); |
| 1739 | *(inst + 1) = CREATE_Ax(OP_EXTRAARG, extra); |
| 1740 | } |
| 1741 | |
| 1742 | |
| 1743 | /* |
no test coverage detected