| 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 1adb5dae93031ffb4be047ec8607546c85d2b2db..74f943b4fa22da500b9516c5cd643434bffec675 100644
|
| --- a/test/unittests/compiler/js-typed-lowering-unittest.cc
|
| +++ b/test/unittests/compiler/js-typed-lowering-unittest.cc
|
| @@ -212,9 +212,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(ToBooleanHint::kAny),
|
| - input, context, graph()->start()));
|
| + Reduction r = Reduce(graph()->NewNode(
|
| + javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
|
| ASSERT_TRUE(r.Changed());
|
| EXPECT_EQ(input, r.replacement());
|
| }
|
| @@ -242,9 +241,8 @@ TEST_F(JSTypedLoweringTest, JSToBooleanWithFalsish) {
|
| zone()),
|
| 0);
|
| Node* context = Parameter(Type::Any(), 1);
|
| - Reduction r =
|
| - Reduce(graph()->NewNode(javascript()->ToBoolean(ToBooleanHint::kAny),
|
| - input, context, graph()->start()));
|
| + Reduction r = Reduce(graph()->NewNode(
|
| + javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
|
| ASSERT_TRUE(r.Changed());
|
| EXPECT_THAT(r.replacement(), IsFalseConstant());
|
| }
|
| @@ -258,9 +256,8 @@ TEST_F(JSTypedLoweringTest, JSToBooleanWithTruish) {
|
| zone()),
|
| 0);
|
| Node* context = Parameter(Type::Any(), 1);
|
| - Reduction r =
|
| - Reduce(graph()->NewNode(javascript()->ToBoolean(ToBooleanHint::kAny),
|
| - input, context, graph()->start()));
|
| + Reduction r = Reduce(graph()->NewNode(
|
| + javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
|
| ASSERT_TRUE(r.Changed());
|
| EXPECT_THAT(r.replacement(), IsTrueConstant());
|
| }
|
| @@ -269,9 +266,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(ToBooleanHint::kAny),
|
| - input, context, graph()->start()));
|
| + Reduction r = Reduce(graph()->NewNode(
|
| + javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
|
| ASSERT_TRUE(r.Changed());
|
| EXPECT_THAT(r.replacement(), IsTrueConstant());
|
| }
|
| @@ -280,9 +276,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(ToBooleanHint::kAny),
|
| - input, context, graph()->start()));
|
| + Reduction r = Reduce(graph()->NewNode(
|
| + javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
|
| ASSERT_TRUE(r.Changed());
|
| EXPECT_THAT(r.replacement(),
|
| IsBooleanNot(IsNumberEqual(input, IsNumberConstant(0.0))));
|
| @@ -292,9 +287,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(ToBooleanHint::kAny),
|
| - input, context, graph()->start()));
|
| + Reduction r = Reduce(graph()->NewNode(
|
| + javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
|
| ASSERT_TRUE(r.Changed());
|
| EXPECT_THAT(
|
| r.replacement(),
|
| @@ -307,9 +301,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(ToBooleanHint::kAny),
|
| - input, context, graph()->start()));
|
| + Reduction r = Reduce(graph()->NewNode(
|
| + javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
|
| ASSERT_FALSE(r.Changed());
|
| }
|
|
|
| @@ -391,9 +384,8 @@ 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, graph()->start(), graph()->start()));
|
| + Reduction r = Reduce(
|
| + graph()->NewNode(javascript()->StrictEqual(), lhs, the_hole, context));
|
| ASSERT_TRUE(r.Changed());
|
| EXPECT_THAT(r.replacement(), IsFalseConstant());
|
| }
|
| @@ -405,8 +397,7 @@ 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,
|
| - graph()->start(), graph()->start()));
|
| + Reduce(graph()->NewNode(javascript()->StrictEqual(), lhs, rhs, context));
|
| ASSERT_TRUE(r.Changed());
|
| EXPECT_THAT(r.replacement(), IsReferenceEqual(Type::Unique(), lhs, rhs));
|
| }
|
|
|