mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 973118 - Differential Testing: Different output message involving +x, r=bhackett
This commit is contained in:
parent
b27e93c69a
commit
394d6b3c2d
4
js/src/jit-test/tests/ion/bug973118.js
Normal file
4
js/src/jit-test/tests/ion/bug973118.js
Normal file
@ -0,0 +1,4 @@
|
||||
function h(x) { return +x == x };
|
||||
h(false)
|
||||
assertEq(h(null), false);
|
||||
assertEq(h(null), false);
|
@ -1584,7 +1584,7 @@ MacroAssembler::convertValueToInt(ValueOperand value, MDefinition *maybeInput,
|
||||
Label done, isInt32, isBool, isDouble, isNull, isString;
|
||||
|
||||
branchEqualTypeIfNeeded(MIRType_Int32, maybeInput, tag, &isInt32);
|
||||
if (conversion == IntConversion_Any)
|
||||
if (conversion == IntConversion_Any || conversion == IntConversion_NumbersOrBoolsOnly)
|
||||
branchEqualTypeIfNeeded(MIRType_Boolean, maybeInput, tag, &isBool);
|
||||
branchEqualTypeIfNeeded(MIRType_Double, maybeInput, tag, &isDouble);
|
||||
|
||||
|
@ -1192,6 +1192,7 @@ class MacroAssembler : public MacroAssemblerSpecific
|
||||
|
||||
enum IntConversionInputKind {
|
||||
IntConversion_NumbersOnly,
|
||||
IntConversion_NumbersOrBoolsOnly,
|
||||
IntConversion_Any
|
||||
};
|
||||
|
||||
|
@ -235,15 +235,16 @@ ComparePolicy::adjustInputs(TempAllocator &alloc, MInstruction *def)
|
||||
(compare->compareType() == MCompare::Compare_Int32MaybeCoerceLHS && i == 0) ||
|
||||
(compare->compareType() == MCompare::Compare_Int32MaybeCoerceRHS && i == 1))
|
||||
{
|
||||
convert = MacroAssembler::IntConversion_Any;
|
||||
convert = MacroAssembler::IntConversion_NumbersOrBoolsOnly;
|
||||
}
|
||||
if (convert == MacroAssembler::IntConversion_NumbersOnly) {
|
||||
if (in->type() != MIRType_Int32 && in->type() != MIRType_Value)
|
||||
in = boxAt(alloc, def, in);
|
||||
} else {
|
||||
if (in->type() == MIRType_Undefined ||
|
||||
in->type() == MIRType_String ||
|
||||
in->type() == MIRType_Object)
|
||||
MOZ_ASSERT(convert == MacroAssembler::IntConversion_NumbersOrBoolsOnly);
|
||||
if (in->type() != MIRType_Int32 &&
|
||||
in->type() != MIRType_Boolean &&
|
||||
in->type() != MIRType_Value)
|
||||
{
|
||||
in = boxAt(alloc, def, in);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user