diff options
Diffstat (limited to '')
-rw-r--r-- | src/lj_record.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lj_record.c b/src/lj_record.c index a56876c5..b92db957 100644 --- a/src/lj_record.c +++ b/src/lj_record.c | |||
@@ -1448,16 +1448,16 @@ static TRef rec_idx_key(jit_State *J, RecordIndex *ix, IRRef *rbref, | |||
1448 | key = emitir(IRTN(IR_CONV), key, IRCONV_NUM_INT); | 1448 | key = emitir(IRTN(IR_CONV), key, IRCONV_NUM_INT); |
1449 | if (tref_isk(key)) { | 1449 | if (tref_isk(key)) { |
1450 | /* Optimize lookup of constant hash keys. */ | 1450 | /* Optimize lookup of constant hash keys. */ |
1451 | MSize hslot = (MSize)((char *)ix->oldv - (char *)&noderef(t->node)[0].val); | 1451 | GCSize hslot = (GCSize)((char *)ix->oldv-(char *)&noderef(t->node)[0].val); |
1452 | if (t->hmask > 0 && hslot <= t->hmask*(MSize)sizeof(Node) && | 1452 | if (hslot <= t->hmask*(GCSize)sizeof(Node) && |
1453 | hslot <= 65535*(MSize)sizeof(Node)) { | 1453 | hslot <= 65535*(GCSize)sizeof(Node)) { |
1454 | TRef node, kslot, hm; | 1454 | TRef node, kslot, hm; |
1455 | *rbref = J->cur.nins; /* Mark possible rollback point. */ | 1455 | *rbref = J->cur.nins; /* Mark possible rollback point. */ |
1456 | *rbguard = J->guardemit; | 1456 | *rbguard = J->guardemit; |
1457 | hm = emitir(IRTI(IR_FLOAD), ix->tab, IRFL_TAB_HMASK); | 1457 | hm = emitir(IRTI(IR_FLOAD), ix->tab, IRFL_TAB_HMASK); |
1458 | emitir(IRTGI(IR_EQ), hm, lj_ir_kint(J, (int32_t)t->hmask)); | 1458 | emitir(IRTGI(IR_EQ), hm, lj_ir_kint(J, (int32_t)t->hmask)); |
1459 | node = emitir(IRT(IR_FLOAD, IRT_PGC), ix->tab, IRFL_TAB_NODE); | 1459 | node = emitir(IRT(IR_FLOAD, IRT_PGC), ix->tab, IRFL_TAB_NODE); |
1460 | kslot = lj_ir_kslot(J, key, hslot / sizeof(Node)); | 1460 | kslot = lj_ir_kslot(J, key, (IRRef)(hslot / sizeof(Node))); |
1461 | return emitir(IRTG(IR_HREFK, IRT_PGC), node, kslot); | 1461 | return emitir(IRTG(IR_HREFK, IRT_PGC), node, kslot); |
1462 | } | 1462 | } |
1463 | } | 1463 | } |