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

Function luaK_settablesize

third-party/lua-5.4.6/src/lcode.c:1793–1801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

constructorFunction · 0.70

Calls 1

luaO_ceillog2Function · 0.70

Tested by

no test coverage detected