| 1872 | |
| 1873 | |
| 1874 | void luaK_settablesize (FuncState *fs, int pc, int ra, int asize, int hsize) { |
| 1875 | Instruction *inst = &fs->f->code[pc]; |
| 1876 | int extra = asize / (MAXARG_vC + 1); /* higher bits of array size */ |
| 1877 | int rc = asize % (MAXARG_vC + 1); /* lower bits of array size */ |
| 1878 | int k = (extra > 0); /* true iff needs extra argument */ |
| 1879 | hsize = (hsize != 0) ? luaO_ceillog2(cast_uint(hsize)) + 1 : 0; |
| 1880 | *inst = CREATE_vABCk(OP_NEWTABLE, ra, hsize, rc, k); |
| 1881 | *(inst + 1) = CREATE_Ax(OP_EXTRAARG, extra); |
| 1882 | } |
| 1883 | |
| 1884 | |
| 1885 | /* |
no test coverage detected