diff options
author | Mike Pall <mike> | 2015-06-09 23:46:38 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2015-06-09 23:46:38 +0200 |
commit | c5d262f2d2dea317bf15d07d98fc4ab7e62fe548 (patch) | |
tree | f5400cf9c77120db1744efa4954c38e614ae4d2e /src | |
parent | fb19df9fd765ce7384e2e28cec78b3c30a10d5ee (diff) | |
download | luajit-c5d262f2d2dea317bf15d07d98fc4ab7e62fe548.tar.gz luajit-c5d262f2d2dea317bf15d07d98fc4ab7e62fe548.tar.bz2 luajit-c5d262f2d2dea317bf15d07d98fc4ab7e62fe548.zip |
Fix table allocation bump optimization (again).
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_record.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) | |||
1159 | } else if (ir->o == IR_TDUP) { | 1159 | } else if (ir->o == IR_TDUP) { |
1160 | GCtab *tpl = gco2tab(proto_kgc(&gcref(rbc->pt)->pt, ~(ptrdiff_t)bc_d(*pc))); | 1160 | GCtab *tpl = gco2tab(proto_kgc(&gcref(rbc->pt)->pt, ~(ptrdiff_t)bc_d(*pc))); |
1161 | /* Grow template table, but preserve keys with nil values. */ | 1161 | /* Grow template table, but preserve keys with nil values. */ |
1162 | if (tb->asize > tpl->asize || (1u << nhbits)-1 > tpl->hmask) { | 1162 | if ((tb->asize > tpl->asize && (1u << nhbits)-1 == tpl->hmask) || |
1163 | (tb->asize == tpl->asize && (1u << nhbits)-1 > tpl->hmask)) { | ||
1163 | Node *node = noderef(tpl->node); | 1164 | Node *node = noderef(tpl->node); |
1164 | uint32_t i, hmask = tpl->hmask; | 1165 | uint32_t i, hmask = tpl->hmask; |
1165 | for (i = 0; i <= hmask; i++) { | 1166 | for (i = 0; i <= hmask; i++) { |