From 69906d15de494cd02acaa3c4f3cac71217ae2439 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Tue, 6 Nov 2012 16:56:25 +0100 Subject: [PATCH] Don't create unneeded array part for template tables. --- src/lj_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_parse.c b/src/lj_parse.c index 29def7b4..2fecaefc 100644 --- a/src/lj_parse.c +++ b/src/lj_parse.c @@ -1761,7 +1761,7 @@ static void expr_table(LexState *ls, ExpDesc *e) TValue k, *v; if (!t) { /* Create template table on demand. */ 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); fs->bcbase[pc].ins = BCINS_AD(BC_TDUP, freg-1, kidx); } -- 2.11.4.GIT