Fix table allocation bump optimization (again).

This commit is contained in:
Mike Pall 2015-06-09 23:46:38 +02:00
parent fb19df9fd7
commit c5d262f2d2

View File

@ -1159,7 +1159,8 @@ static void rec_idx_bump(jit_State *J, RecordIndex *ix)
} else if (ir->o == IR_TDUP) { } else if (ir->o == IR_TDUP) {
GCtab *tpl = gco2tab(proto_kgc(&gcref(rbc->pt)->pt, ~(ptrdiff_t)bc_d(*pc))); GCtab *tpl = gco2tab(proto_kgc(&gcref(rbc->pt)->pt, ~(ptrdiff_t)bc_d(*pc)));
/* Grow template table, but preserve keys with nil values. */ /* 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); Node *node = noderef(tpl->node);
uint32_t i, hmask = tpl->hmask; uint32_t i, hmask = tpl->hmask;
for (i = 0; i <= hmask; i++) { for (i = 0; i <= hmask; i++) {