Backed out changeset 3cbd085908c8 (bug 1314438)

CLOSED TREE
This commit is contained in:
Iris Hsiao 2016-11-07 17:47:07 +08:00
parent 10c14a4b14
commit f3100540cc
3 changed files with 2 additions and 21 deletions

View File

@ -1,12 +0,0 @@
function f(x) {
return Math.pow(x, x) && 0;
}
f(0);
assertEq(uneval(f(-999)), "-0");
function g(x) {
return (-1 % x && Math.cos(8) >>> 0);
}
g(2);
assertEq(uneval(g(-1)), "-0");

View File

@ -2390,8 +2390,6 @@ MPhi::foldsTernary(TempAllocator& alloc)
// - fold testArg ? testArg : 0 to testArg
// - fold testArg ? 0 : testArg to 0
if (testArg->type() == MIRType::Int32 && c->numberToDouble() == 0) {
testArg->setGuardRangeBailoutsUnchecked();
// When folding to the constant we need to hoist it.
if (trueDef == c && !c->block()->dominates(block()))
c->block()->moveBefore(pred->lastIns(), c);
@ -2924,9 +2922,6 @@ CanProduceNegativeZero(MDefinition* def)
static inline bool
NeedNegativeZeroCheck(MDefinition* def)
{
if (def->isGuardRangeBailouts())
return true;
// Test if all uses have the same semantics for -0 and 0
for (MUseIterator use = def->usesBegin(); use != def->usesEnd(); use++) {
if (use->consumer()->isResumePoint())
@ -4393,7 +4388,8 @@ MCompare::tryFoldEqualOperands(bool* result)
return false;
}
lhs()->setGuardRangeBailoutsUnchecked();
if (DeadIfUnused(lhs()))
lhs()->setGuardRangeBailouts();
*result = (jsop() == JSOP_STRICTEQ);
return true;

View File

@ -796,9 +796,6 @@ ValueNumberer::visitDefinition(MDefinition* def)
// needed, so we can clear |def|'s guard flag and let it be discarded.
def->setNotGuardUnchecked();
if (def->isGuardRangeBailouts())
sim->setGuardRangeBailoutsUnchecked();
if (DeadIfUnused(def)) {
if (!discardDefsRecursively(def))
return false;