From: Mike Pall Date: Tue, 9 Jun 2015 21:46:38 +0000 (+0200) Subject: Fix table allocation bump optimization (again). X-Git-Tag: v2.1.0-beta1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5d262f2d2dea317bf15d07d98fc4ab7e62fe548;p=thirdparty%2FLuaJIT.git Fix table allocation bump optimization (again). --- diff --git a/src/lj_record.c b/src/lj_record.c index dc1bf835..082f12e0 100644 --- a/src/lj_record.c +++ b/src/lj_record.c @@ -1159,7 +1159,8 @@ static void rec_idx_bump(jit_State *J, RecordIndex *ix) } else if (ir->o == IR_TDUP) { GCtab *tpl = gco2tab(proto_kgc(&gcref(rbc->pt)->pt, ~(ptrdiff_t)bc_d(*pc))); /* Grow template table, but preserve keys with nil values. */ - if (tb->asize > tpl->asize || (1u << nhbits)-1 > tpl->hmask) { + if ((tb->asize > tpl->asize && (1u << nhbits)-1 == tpl->hmask) || + (tb->asize == tpl->asize && (1u << nhbits)-1 > tpl->hmask)) { Node *node = noderef(tpl->node); uint32_t i, hmask = tpl->hmask; for (i = 0; i <= hmask; i++) {