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 e061e326f0ca016335cecd069b3988b93e49c241..da964db23ad9192c319327e6f3bb422dc2684afa 100644 |
--- a/test/unittests/compiler/js-typed-lowering-unittest.cc |
+++ b/test/unittests/compiler/js-typed-lowering-unittest.cc |
@@ -112,8 +112,8 @@ class JSTypedLoweringTest : public TypedGraphTest { |
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)); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->UnaryNot(), input, |
+ context, graph()->start())); |
ASSERT_TRUE(r.Changed()); |
EXPECT_THAT(r.replacement(), IsBooleanNot(input)); |
} |
@@ -122,8 +122,8 @@ TEST_F(JSTypedLoweringTest, JSUnaryNotWithBoolean) { |
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)); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->UnaryNot(), input, |
+ context, graph()->start())); |
ASSERT_TRUE(r.Changed()); |
EXPECT_THAT(r.replacement(), IsNumberEqual(input, IsNumberConstant(0))); |
} |
@@ -151,8 +151,8 @@ TEST_F(JSTypedLoweringTest, JSUnaryNotWithFalsish) { |
zone()), |
0); |
Node* context = Parameter(Type::Any(), 1); |
- Reduction r = |
- Reduce(graph()->NewNode(javascript()->UnaryNot(), input, context)); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->UnaryNot(), input, |
+ context, graph()->start())); |
ASSERT_TRUE(r.Changed()); |
EXPECT_THAT(r.replacement(), IsTrueConstant()); |
} |
@@ -166,8 +166,8 @@ TEST_F(JSTypedLoweringTest, JSUnaryNotWithTruish) { |
zone()), |
0); |
Node* context = Parameter(Type::Any(), 1); |
- Reduction r = |
- Reduce(graph()->NewNode(javascript()->UnaryNot(), input, context)); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->UnaryNot(), input, |
+ context, graph()->start())); |
ASSERT_TRUE(r.Changed()); |
EXPECT_THAT(r.replacement(), IsFalseConstant()); |
} |
@@ -176,8 +176,8 @@ TEST_F(JSTypedLoweringTest, JSUnaryNotWithTruish) { |
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)); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->UnaryNot(), input, |
+ context, graph()->start())); |
ASSERT_TRUE(r.Changed()); |
EXPECT_THAT(r.replacement(), IsFalseConstant()); |
} |
@@ -186,8 +186,8 @@ TEST_F(JSTypedLoweringTest, JSUnaryNotWithNonZeroPlainNumber) { |
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)); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->UnaryNot(), input, |
+ context, graph()->start())); |
ASSERT_TRUE(r.Changed()); |
EXPECT_THAT( |
r.replacement(), |
@@ -200,8 +200,8 @@ TEST_F(JSTypedLoweringTest, JSUnaryNotWithString) { |
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)); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->UnaryNot(), input, |
+ context, graph()->start())); |
ASSERT_FALSE(r.Changed()); |
} |
@@ -307,8 +307,8 @@ TEST_F(JSTypedLoweringTest, ParameterWithUndefined) { |
TEST_F(JSTypedLoweringTest, JSToBooleanWithBoolean) { |
Node* input = Parameter(Type::Boolean(), 0); |
Node* context = Parameter(Type::Any(), 1); |
- Reduction r = |
- Reduce(graph()->NewNode(javascript()->ToBoolean(), input, context)); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->ToBoolean(), input, |
+ context, graph()->start())); |
ASSERT_TRUE(r.Changed()); |
EXPECT_EQ(input, r.replacement()); |
} |
@@ -336,8 +336,8 @@ TEST_F(JSTypedLoweringTest, JSToBooleanWithFalsish) { |
zone()), |
0); |
Node* context = Parameter(Type::Any(), 1); |
- Reduction r = |
- Reduce(graph()->NewNode(javascript()->ToBoolean(), input, context)); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->ToBoolean(), input, |
+ context, graph()->start())); |
ASSERT_TRUE(r.Changed()); |
EXPECT_THAT(r.replacement(), IsFalseConstant()); |
} |
@@ -351,8 +351,8 @@ TEST_F(JSTypedLoweringTest, JSToBooleanWithTruish) { |
zone()), |
0); |
Node* context = Parameter(Type::Any(), 1); |
- Reduction r = |
- Reduce(graph()->NewNode(javascript()->ToBoolean(), input, context)); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->ToBoolean(), input, |
+ context, graph()->start())); |
ASSERT_TRUE(r.Changed()); |
EXPECT_THAT(r.replacement(), IsTrueConstant()); |
} |
@@ -361,8 +361,8 @@ TEST_F(JSTypedLoweringTest, JSToBooleanWithTruish) { |
TEST_F(JSTypedLoweringTest, JSToBooleanWithNonZeroPlainNumber) { |
Node* input = Parameter(Type::Range(1, V8_INFINITY, zone()), 0); |
Node* context = Parameter(Type::Any(), 1); |
- Reduction r = |
- Reduce(graph()->NewNode(javascript()->ToBoolean(), input, context)); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->ToBoolean(), input, |
+ context, graph()->start())); |
ASSERT_TRUE(r.Changed()); |
EXPECT_THAT(r.replacement(), IsTrueConstant()); |
} |
@@ -371,8 +371,8 @@ TEST_F(JSTypedLoweringTest, JSToBooleanWithNonZeroPlainNumber) { |
TEST_F(JSTypedLoweringTest, JSToBooleanWithOrderedNumber) { |
Node* input = Parameter(Type::OrderedNumber(), 0); |
Node* context = Parameter(Type::Any(), 1); |
- Reduction r = |
- Reduce(graph()->NewNode(javascript()->ToBoolean(), input, context)); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->ToBoolean(), input, |
+ context, graph()->start())); |
ASSERT_TRUE(r.Changed()); |
EXPECT_THAT(r.replacement(), |
IsBooleanNot(IsNumberEqual(input, IsNumberConstant(0.0)))); |
@@ -382,8 +382,8 @@ TEST_F(JSTypedLoweringTest, JSToBooleanWithOrderedNumber) { |
TEST_F(JSTypedLoweringTest, JSToBooleanWithString) { |
Node* input = Parameter(Type::String(), 0); |
Node* context = Parameter(Type::Any(), 1); |
- Reduction r = |
- Reduce(graph()->NewNode(javascript()->ToBoolean(), input, context)); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->ToBoolean(), input, |
+ context, graph()->start())); |
ASSERT_TRUE(r.Changed()); |
EXPECT_THAT( |
r.replacement(), |
@@ -396,8 +396,8 @@ TEST_F(JSTypedLoweringTest, JSToBooleanWithString) { |
TEST_F(JSTypedLoweringTest, JSToBooleanWithAny) { |
Node* input = Parameter(Type::Any(), 0); |
Node* context = Parameter(Type::Any(), 1); |
- Reduction r = |
- Reduce(graph()->NewNode(javascript()->ToBoolean(), input, context)); |
+ Reduction r = Reduce(graph()->NewNode(javascript()->ToBoolean(), input, |
+ context, graph()->start())); |
ASSERT_FALSE(r.Changed()); |
} |
@@ -429,8 +429,9 @@ TEST_F(JSTypedLoweringTest, JSStrictEqualWithTheHole) { |
Node* const context = UndefinedConstant(); |
TRACED_FOREACH(Type*, type, kJSTypes) { |
Node* const lhs = Parameter(type); |
- Reduction r = Reduce( |
- graph()->NewNode(javascript()->StrictEqual(), lhs, the_hole, context)); |
+ Reduction r = |
+ Reduce(graph()->NewNode(javascript()->StrictEqual(), lhs, the_hole, |
+ context, graph()->start(), graph()->start())); |
ASSERT_TRUE(r.Changed()); |
EXPECT_THAT(r.replacement(), IsFalseConstant()); |
} |
@@ -442,7 +443,8 @@ TEST_F(JSTypedLoweringTest, JSStrictEqualWithUnique) { |
Node* const rhs = Parameter(Type::Unique(), 1); |
Node* const context = Parameter(Type::Any(), 2); |
Reduction r = |
- Reduce(graph()->NewNode(javascript()->StrictEqual(), lhs, rhs, context)); |
+ Reduce(graph()->NewNode(javascript()->StrictEqual(), lhs, rhs, context, |
+ graph()->start(), graph()->start())); |
ASSERT_TRUE(r.Changed()); |
EXPECT_THAT(r.replacement(), IsReferenceEqual(Type::Unique(), lhs, rhs)); |
} |