| 2087 | |
| 2088 | |
| 2089 | void luaK_settablesize (FuncState *fs, int pc, int ra, int asize, int hsize) { |
| 2090 | Instruction *inst = &fs->f->code[pc]; |
| 2091 | int extra = asize / (MAXARG_vC + 1); /* higher bits of array size */ |
| 2092 | int rc = asize % (MAXARG_vC + 1); /* lower bits of array size */ |
| 2093 | int k = (extra > 0); /* true iff needs extra argument */ |
| 2094 | hsize = (hsize != 0) ? luaO_ceillog2(cast_uint(hsize)) + 1 : 0; |
| 2095 | *inst = CREATE_vABCk(OP_NEWTABLE, ra, hsize, rc, k); |
| 2096 | *(inst + 1) = CREATE_Ax(OP_EXTRAARG, extra); |
| 2097 | } |
| 2098 | |
| 2099 | |
| 2100 | /* |
no test coverage detected