aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2012-11-06 16:58:52 +0100
committerMike Pall <mike>2012-11-06 16:58:52 +0100
commitc022692ab008102bf45786c8241f2898cef5586e (patch)
treeec143a4ed1e1388cb36e9895418204496ca5af4c /src
parentae1987d5357c45a5dac0c8edc29609ca64ce76be (diff)
downloadluajit-c022692ab008102bf45786c8241f2898cef5586e.tar.gz
luajit-c022692ab008102bf45786c8241f2898cef5586e.tar.bz2
luajit-c022692ab008102bf45786c8241f2898cef5586e.zip
Don't propagate implicitly widened number to index metamethods.
Diffstat (limited to 'src')
-rw-r--r--src/lj_record.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_record.c b/src/lj_record.c
index 8f42c4af..82350ccd 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -1121,7 +1121,7 @@ static TRef rec_idx_key(jit_State *J, RecordIndex *ix)
1121 return lj_ir_kkptr(J, niltvg(J2G(J))); 1121 return lj_ir_kkptr(J, niltvg(J2G(J)));
1122 } 1122 }
1123 if (tref_isinteger(key)) /* Hash keys are based on numbers, not ints. */ 1123 if (tref_isinteger(key)) /* Hash keys are based on numbers, not ints. */
1124 ix->key = key = emitir(IRTN(IR_CONV), key, IRCONV_NUM_INT); 1124 key = emitir(IRTN(IR_CONV), key, IRCONV_NUM_INT);
1125 if (tref_isk(key)) { 1125 if (tref_isk(key)) {
1126 /* Optimize lookup of constant hash keys. */ 1126 /* Optimize lookup of constant hash keys. */
1127 MSize hslot = (MSize)((char *)ix->oldv - (char *)&noderef(t->node)[0].val); 1127 MSize hslot = (MSize)((char *)ix->oldv - (char *)&noderef(t->node)[0].val);