MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / luaK_settablesize

Function luaK_settablesize

src/lcode.cpp:2089–2097  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2087
2088
2089void 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/*

Callers 3

constructorFunction · 0.85
newtableFunction · 0.85
classexprFunction · 0.85

Calls 1

luaO_ceillog2Function · 0.85

Tested by

no test coverage detected