author | Hannes Verschore <hv1989@gmail.com> |
Tue, 19 Mar 2013 23:49:49 +0100 | |
changeset 125515 | bbb0081483d995a95f9764bcf537e27170f6cb6b |
parent 125514 | 0e41b1ed18c21752d09c3c0b6a02166982c81288 |
child 125516 | 1356923ff93edb11b68682f4836d631c39ce3908 |
push id | 24459 |
push user | emorley@mozilla.com |
push date | Wed, 20 Mar 2013 11:46:36 +0000 |
treeherder | mozilla-central@1d6fe70c79c5 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | nbp |
bugs | 852140, 844452 |
milestone | 22.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
js/src/ion/TypePolicy.cpp | file | annotate | diff | comparison | revisions | |
js/src/jit-test/tests/ion/bug852140.js | file | annotate | diff | comparison | revisions |
--- a/js/src/ion/TypePolicy.cpp +++ b/js/src/ion/TypePolicy.cpp @@ -155,36 +155,37 @@ ComparePolicy::adjustInputs(MInstruction def->replaceOperand(1, unbox); } JS_ASSERT(def->getOperand(0)->type() != MIRType_String); JS_ASSERT(def->getOperand(1)->type() == MIRType_String); return true; } + if (compare->compareType() == MCompare::Compare_Undefined || + compare->compareType() == MCompare::Compare_Null) + { + // Nothing to do for undefined and null, lowering handles all types. + return true; + } + // Convert all inputs to the right input type MIRType type = compare->inputType(); - - // Nothing to do for undefined and null, lowering handles all types. - if (type == MIRType_Undefined || type == MIRType_Null) - return true; - + JS_ASSERT(type == MIRType_Int32 || type == MIRType_Double || + type == MIRType_Object || type == MIRType_String); for (size_t i = 0; i < 2; i++) { MDefinition *in = def->getOperand(i); if (in->type() == type) continue; MInstruction *replace; // See BinaryArithPolicy::adjustInputs for an explanation of the following - if (in->type() == MIRType_Object || in->type() == MIRType_String || - (in->type() == MIRType_Boolean && type != MIRType_Double && type != MIRType_Int32)) - { + if (in->type() == MIRType_Object || in->type() == MIRType_String) in = boxAt(def, in); - } switch (type) { case MIRType_Double: replace = MToDouble::New(in); break; case MIRType_Int32: replace = MToInt32::New(in); break;