MCPcopy Create free account
hub / github.com/danomatika/ofxLua / luaK_settablesize

Function luaK_settablesize

libs/lua/lcode.c:1789–1797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

constructorFunction · 0.85

Calls 1

luaO_ceillog2Function · 0.85

Tested by

no test coverage detected