mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 966957: Concat Float32 too; r=h4writer
This commit is contained in:
parent
d32c25f85d
commit
d58beee5cc
@ -229,3 +229,22 @@ function testFloorDouble() {
|
||||
}
|
||||
test(setupFloor, testFloor);
|
||||
test(setupFloorDouble, testFloorDouble);
|
||||
|
||||
function setupTestToString() {
|
||||
setupFloor();
|
||||
setupFloorDouble();
|
||||
f32[8] = 4 / 3;
|
||||
f32[9] = 4;
|
||||
}
|
||||
function testToString() {
|
||||
for (var i = 0; i < 10; ++i) {
|
||||
var f = f32[i];
|
||||
var str = f + '';
|
||||
assertFloat32(f, true);
|
||||
|
||||
assertEq(str, (f + -0) + '');
|
||||
if (f !== -0) // -0 + '' === 0
|
||||
assertEq(parseFloat(str), f);
|
||||
}
|
||||
}
|
||||
test(setupFloorDouble, testToString);
|
||||
|
@ -3739,11 +3739,8 @@ IonBuilder::jsop_binary(JSOp op, MDefinition *left, MDefinition *right)
|
||||
if (op == JSOP_ADD &&
|
||||
((left->type() == MIRType_String &&
|
||||
(right->type() == MIRType_String ||
|
||||
right->type() == MIRType_Int32 ||
|
||||
right->type() == MIRType_Double)) ||
|
||||
(left->type() == MIRType_Int32 &&
|
||||
right->type() == MIRType_String) ||
|
||||
(left->type() == MIRType_Double &&
|
||||
IsNumberType(right->type()))) ||
|
||||
(IsNumberType(left->type()) &&
|
||||
right->type() == MIRType_String)))
|
||||
{
|
||||
MConcat *ins = MConcat::New(alloc(), left, right);
|
||||
|
Loading…
Reference in New Issue
Block a user