MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaK_settablesize

Function luaK_settablesize

third-party/lua-5.5.0/src/lcode.c:1874–1882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1872
1873
1874void 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/*

Callers 1

constructorFunction · 0.70

Calls 1

luaO_ceillog2Function · 0.70

Tested by

no test coverage detected