mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 852140: IonMonkey: Backout bug 844452 and add testcase, r=nbp
This commit is contained in:
parent
2c73a3ccb2
commit
b7b4a74a9e
@ -160,13 +160,17 @@ ComparePolicy::adjustInputs(MInstruction *def)
|
||||
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)
|
||||
@ -175,11 +179,8 @@ ComparePolicy::adjustInputs(MInstruction *def)
|
||||
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:
|
||||
|
7
js/src/jit-test/tests/ion/bug852140.js
Normal file
7
js/src/jit-test/tests/ion/bug852140.js
Normal file
@ -0,0 +1,7 @@
|
||||
function reportCompare (expected, actual) {
|
||||
if (expected != actual) {}
|
||||
}
|
||||
function exitFunc (funcName)
|
||||
reportCompare(undefined, '');
|
||||
reportCompare('', '');
|
||||
exitFunc();
|
Loading…
Reference in New Issue
Block a user