Chromium Code Reviews| Index: test/unittests/compiler/js-typed-lowering-unittest.cc |
| diff --git a/test/unittests/compiler/js-typed-lowering-unittest.cc b/test/unittests/compiler/js-typed-lowering-unittest.cc |
| index 6ba205850b6211fd3beb31bc8c70e855f3ab26a3..f0bcce6ad91087902cec4cfd4e2d10009c562dfb 100644 |
| --- a/test/unittests/compiler/js-typed-lowering-unittest.cc |
| +++ b/test/unittests/compiler/js-typed-lowering-unittest.cc |
| @@ -114,7 +114,8 @@ TEST_F(JSTypedLoweringTest, JSUnaryNotWithBoolean) { |
| Node* input = Parameter(Type::Boolean(), 0); |
| Node* context = Parameter(Type::Any(), 1); |
| Reduction r = |
| - Reduce(graph()->NewNode(javascript()->UnaryNot(), input, context)); |
| + Reduce(graph()->NewNode(javascript()->UnaryNot(), |
|
Michael Starzinger
2015/04/24 11:47:06
nit: Several whitespace changes here and throughou
conradw
2015/04/24 12:04:44
Done.
|
| + input, context)); |
| ASSERT_TRUE(r.Changed()); |
| EXPECT_THAT(r.replacement(), IsBooleanNot(input)); |
| } |
| @@ -124,7 +125,8 @@ TEST_F(JSTypedLoweringTest, JSUnaryNotWithOrderedNumber) { |
| Node* input = Parameter(Type::OrderedNumber(), 0); |
| Node* context = Parameter(Type::Any(), 1); |
| Reduction r = |
| - Reduce(graph()->NewNode(javascript()->UnaryNot(), input, context)); |
| + Reduce(graph()->NewNode(javascript()->UnaryNot(), |
| + input, context)); |
| ASSERT_TRUE(r.Changed()); |
| EXPECT_THAT(r.replacement(), IsNumberEqual(input, IsNumberConstant(0))); |
| } |
| @@ -153,7 +155,8 @@ TEST_F(JSTypedLoweringTest, JSUnaryNotWithFalsish) { |
| 0); |
| Node* context = Parameter(Type::Any(), 1); |
| Reduction r = |
| - Reduce(graph()->NewNode(javascript()->UnaryNot(), input, context)); |
| + Reduce(graph()->NewNode(javascript()->UnaryNot(), |
| + input, context)); |
| ASSERT_TRUE(r.Changed()); |
| EXPECT_THAT(r.replacement(), IsTrueConstant()); |
| } |
| @@ -168,7 +171,8 @@ TEST_F(JSTypedLoweringTest, JSUnaryNotWithTruish) { |
| 0); |
| Node* context = Parameter(Type::Any(), 1); |
| Reduction r = |
| - Reduce(graph()->NewNode(javascript()->UnaryNot(), input, context)); |
| + Reduce(graph()->NewNode(javascript()->UnaryNot(), |
| + input, context)); |
| ASSERT_TRUE(r.Changed()); |
| EXPECT_THAT(r.replacement(), IsFalseConstant()); |
| } |
| @@ -178,7 +182,8 @@ TEST_F(JSTypedLoweringTest, JSUnaryNotWithNonZeroPlainNumber) { |
| Node* input = Parameter(Type::Range(1.0, 42.0, zone()), 0); |
| Node* context = Parameter(Type::Any(), 1); |
| Reduction r = |
| - Reduce(graph()->NewNode(javascript()->UnaryNot(), input, context)); |
| + Reduce(graph()->NewNode(javascript()->UnaryNot(), |
| + input, context)); |
| ASSERT_TRUE(r.Changed()); |
| EXPECT_THAT(r.replacement(), IsFalseConstant()); |
| } |
| @@ -188,7 +193,8 @@ TEST_F(JSTypedLoweringTest, JSUnaryNotWithString) { |
| Node* input = Parameter(Type::String(), 0); |
| Node* context = Parameter(Type::Any(), 1); |
| Reduction r = |
| - Reduce(graph()->NewNode(javascript()->UnaryNot(), input, context)); |
| + Reduce(graph()->NewNode(javascript()->UnaryNot(), |
| + input, context)); |
| ASSERT_TRUE(r.Changed()); |
| EXPECT_THAT( |
| r.replacement(), |
| @@ -202,7 +208,8 @@ TEST_F(JSTypedLoweringTest, JSUnaryNotWithAny) { |
| Node* input = Parameter(Type::Any(), 0); |
| Node* context = Parameter(Type::Any(), 1); |
| Reduction r = |
| - Reduce(graph()->NewNode(javascript()->UnaryNot(), input, context)); |
| + Reduce(graph()->NewNode(javascript()->UnaryNot(), |
| + input, context)); |
| ASSERT_FALSE(r.Changed()); |
| } |
| @@ -455,8 +462,9 @@ TEST_F(JSTypedLoweringTest, JSShiftLeftWithSigned32AndConstant) { |
| Node* const control = graph()->start(); |
| TRACED_FORRANGE(double, rhs, 0, 31) { |
| Reduction r = |
| - Reduce(graph()->NewNode(javascript()->ShiftLeft(), lhs, |
| - NumberConstant(rhs), context, effect, control)); |
| + Reduce(graph()->NewNode(javascript()->ShiftLeft(LanguageMode::SLOPPY), |
| + lhs, NumberConstant(rhs), context, effect, |
| + control)); |
| ASSERT_TRUE(r.Changed()); |
| EXPECT_THAT(r.replacement(), |
| IsWord32Shl(lhs, IsNumberConstant(BitEq(rhs)))); |
| @@ -470,8 +478,9 @@ TEST_F(JSTypedLoweringTest, JSShiftLeftWithSigned32AndUnsigned32) { |
| Node* const context = UndefinedConstant(); |
| Node* const effect = graph()->start(); |
| Node* const control = graph()->start(); |
| - Reduction r = Reduce(graph()->NewNode(javascript()->ShiftLeft(), lhs, rhs, |
| - context, effect, control)); |
| + Reduction r = Reduce(graph()->NewNode(javascript()-> |
| + ShiftLeft(LanguageMode::SLOPPY), |
| + lhs, rhs, context, effect, control)); |
| ASSERT_TRUE(r.Changed()); |
| EXPECT_THAT(r.replacement(), |
| IsWord32Shl(lhs, IsWord32And(rhs, IsInt32Constant(0x1f)))); |
| @@ -489,7 +498,8 @@ TEST_F(JSTypedLoweringTest, JSShiftRightWithSigned32AndConstant) { |
| Node* const control = graph()->start(); |
| TRACED_FORRANGE(double, rhs, 0, 31) { |
| Reduction r = |
| - Reduce(graph()->NewNode(javascript()->ShiftRight(), lhs, |
| + Reduce(graph()->NewNode(javascript()-> |
| + ShiftRight(LanguageMode::SLOPPY), lhs, |
| NumberConstant(rhs), context, effect, control)); |
| ASSERT_TRUE(r.Changed()); |
| EXPECT_THAT(r.replacement(), |
| @@ -504,8 +514,9 @@ TEST_F(JSTypedLoweringTest, JSShiftRightWithSigned32AndUnsigned32) { |
| Node* const context = UndefinedConstant(); |
| Node* const effect = graph()->start(); |
| Node* const control = graph()->start(); |
| - Reduction r = Reduce(graph()->NewNode(javascript()->ShiftRight(), lhs, rhs, |
| - context, effect, control)); |
| + Reduction r = Reduce(graph()->NewNode(javascript()-> |
| + ShiftRight(LanguageMode::SLOPPY), |
| + lhs, rhs, context, effect, control)); |
| ASSERT_TRUE(r.Changed()); |
| EXPECT_THAT(r.replacement(), |
| IsWord32Sar(lhs, IsWord32And(rhs, IsInt32Constant(0x1f)))); |
| @@ -516,15 +527,18 @@ TEST_F(JSTypedLoweringTest, JSShiftRightWithSigned32AndUnsigned32) { |
| // JSShiftRightLogical |
| -TEST_F(JSTypedLoweringTest, JSShiftRightLogicalWithUnsigned32AndConstant) { |
| +TEST_F(JSTypedLoweringTest, |
| + JSShiftRightLogicalWithUnsigned32AndConstant) { |
| Node* const lhs = Parameter(Type::Unsigned32()); |
| Node* const context = UndefinedConstant(); |
| Node* const effect = graph()->start(); |
| Node* const control = graph()->start(); |
| TRACED_FORRANGE(double, rhs, 0, 31) { |
| Reduction r = |
| - Reduce(graph()->NewNode(javascript()->ShiftRightLogical(), lhs, |
| - NumberConstant(rhs), context, effect, control)); |
| + Reduce(graph()->NewNode(javascript()-> |
| + ShiftRightLogical(LanguageMode::SLOPPY), |
| + lhs, NumberConstant(rhs), context, effect, |
| + control)); |
| ASSERT_TRUE(r.Changed()); |
| EXPECT_THAT(r.replacement(), |
| IsWord32Shr(lhs, IsNumberConstant(BitEq(rhs)))); |
| @@ -532,14 +546,16 @@ TEST_F(JSTypedLoweringTest, JSShiftRightLogicalWithUnsigned32AndConstant) { |
| } |
| -TEST_F(JSTypedLoweringTest, JSShiftRightLogicalWithUnsigned32AndUnsigned32) { |
| +TEST_F(JSTypedLoweringTest, |
| + JSShiftRightLogicalWithUnsigned32AndUnsigned32) { |
| Node* const lhs = Parameter(Type::Unsigned32()); |
| Node* const rhs = Parameter(Type::Unsigned32()); |
| Node* const context = UndefinedConstant(); |
| Node* const effect = graph()->start(); |
| Node* const control = graph()->start(); |
| - Reduction r = Reduce(graph()->NewNode(javascript()->ShiftRightLogical(), lhs, |
| - rhs, context, effect, control)); |
| + Reduction r = Reduce(graph()->NewNode(javascript()-> |
| + ShiftRightLogical(LanguageMode::SLOPPY), |
| + lhs, rhs, context, effect, control)); |
| ASSERT_TRUE(r.Changed()); |
| EXPECT_THAT(r.replacement(), |
| IsWord32Shr(lhs, IsWord32And(rhs, IsInt32Constant(0x1f)))); |