]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Don't propagate implicitly widened number to index metamethods.
authorMike Pall <mike>
Tue, 6 Nov 2012 15:58:52 +0000 (16:58 +0100)
committerMike Pall <mike>
Tue, 6 Nov 2012 15:58:52 +0000 (16:58 +0100)
src/lj_record.c

index 8f42c4afc468bb517d69c94899d065b3f9ee9a03..82350ccd0fc3e6bc6208630229cdb09ebcbfa467 100644 (file)
@@ -1121,7 +1121,7 @@ static TRef rec_idx_key(jit_State *J, RecordIndex *ix)
     return lj_ir_kkptr(J, niltvg(J2G(J)));
   }
   if (tref_isinteger(key))  /* Hash keys are based on numbers, not ints. */
-    ix->key = key = emitir(IRTN(IR_CONV), key, IRCONV_NUM_INT);
+    key = emitir(IRTN(IR_CONV), key, IRCONV_NUM_INT);
   if (tref_isk(key)) {
     /* Optimize lookup of constant hash keys. */
     MSize hslot = (MSize)((char *)ix->oldv - (char *)&noderef(t->node)[0].val);