mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
Remove bogus fadd +1 check at the end of the loop. We have long switched over to starting slots as int and hence n++ will be emitted as integer add with i2f, so checking for i2f only is sufficient.
This commit is contained in:
parent
8f92f3d00c
commit
c9e85cc13f
@ -1354,9 +1354,7 @@ TraceRecorder::checkType(jsval& v, uint8 t, bool& unstable)
|
||||
if (!isNumber(v))
|
||||
return false; /* not a number? type mismatch */
|
||||
LIns* i = get(&v);
|
||||
if (!isInt32(v) || (!i->isop(LIR_i2f) &&
|
||||
!(i->isop(LIR_fadd) && i->oprnd2()->isconstq() &&
|
||||
fabs(i->oprnd2()->constvalf()) == 1.0))) {
|
||||
if (!i->isop(LIR_i2f)) {
|
||||
debug_only_v(printf("int slot is !isInt32, slot #%d, triggering re-compilation\n",
|
||||
!isGlobal(&v)
|
||||
? nativeStackOffset(&v)
|
||||
@ -1366,7 +1364,7 @@ TraceRecorder::checkType(jsval& v, uint8 t, bool& unstable)
|
||||
return true; /* keep checking types, but request re-compilation */
|
||||
}
|
||||
/* Looks good, slot is an int32, the last instruction should be i2f. */
|
||||
JS_ASSERT(i->isop(LIR_i2f));
|
||||
JS_ASSERT(isInt32(v) && i->isop(LIR_i2f));
|
||||
/* We got the final LIR_i2f as we expected. Overwrite the value in that
|
||||
slot with the argument of i2f since we want the integer store to flow along
|
||||
the loop edge, not the casted value. */
|
||||
|
Loading…
Reference in New Issue
Block a user