Bug 1064251 - IonMonkey: Fold strict (not) equal on constant numbers, r=sstangl

This commit is contained in:
Hannes Verschore 2014-09-10 23:21:12 +02:00
parent 826a042efb
commit 969d23129d

View File

@ -2818,12 +2818,12 @@ MCompare::evaluateConstantOperands(bool *result)
case JSOP_GE:
*result = (lhsUint >= rhsUint);
break;
case JSOP_STRICTEQ: // Fall through.
case JSOP_EQ:
case JSOP_STRICTEQ:
*result = (lhsUint == rhsUint);
break;
case JSOP_STRICTNE: // Fall through.
case JSOP_NE:
case JSOP_STRICTNE:
*result = (lhsUint != rhsUint);
break;
default:
@ -2849,9 +2849,11 @@ MCompare::evaluateConstantOperands(bool *result)
case JSOP_GE:
*result = (lhs.toNumber() >= rhs.toNumber());
break;
case JSOP_STRICTEQ: // Fall through.
case JSOP_EQ:
*result = (lhs.toNumber() == rhs.toNumber());
break;
case JSOP_STRICTNE: // Fall through.
case JSOP_NE:
*result = (lhs.toNumber() != rhs.toNumber());
break;