mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-12 17:24:09 +00:00
Don't create unneeded array part for template tables.
This commit is contained in:
parent
eb6f890ebd
commit
69906d15de
@ -1761,7 +1761,7 @@ static void expr_table(LexState *ls, ExpDesc *e)
|
|||||||
TValue k, *v;
|
TValue k, *v;
|
||||||
if (!t) { /* Create template table on demand. */
|
if (!t) { /* Create template table on demand. */
|
||||||
BCReg kidx;
|
BCReg kidx;
|
||||||
t = lj_tab_new(fs->L, narr, hsize2hbits(nhash));
|
t = lj_tab_new(fs->L, needarr ? narr : 0, hsize2hbits(nhash));
|
||||||
kidx = const_gc(fs, obj2gco(t), LJ_TTAB);
|
kidx = const_gc(fs, obj2gco(t), LJ_TTAB);
|
||||||
fs->bcbase[pc].ins = BCINS_AD(BC_TDUP, freg-1, kidx);
|
fs->bcbase[pc].ins = BCINS_AD(BC_TDUP, freg-1, kidx);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user