mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Don't propagate implicitly widened number to index metamethods.
This commit is contained in:
parent
ae1987d535
commit
c022692ab0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user