OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "test/unittests/compiler/graph-unittest.h" | 5 #include "test/unittests/compiler/graph-unittest.h" |
6 | 6 |
7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
8 #include "src/factory.h" | 8 #include "src/factory.h" |
9 #include "src/objects-inl.h" // TODO(everyone): Make typer.h IWYU compliant. | 9 #include "src/objects-inl.h" // TODO(everyone): Make typer.h IWYU compliant. |
10 #include "test/unittests/compiler/node-test-utils.h" | 10 #include "test/unittests/compiler/node-test-utils.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 Matcher<Node*> GraphTest::IsFalseConstant() { | 92 Matcher<Node*> GraphTest::IsFalseConstant() { |
93 return IsHeapConstant(factory()->false_value()); | 93 return IsHeapConstant(factory()->false_value()); |
94 } | 94 } |
95 | 95 |
96 | 96 |
97 Matcher<Node*> GraphTest::IsTrueConstant() { | 97 Matcher<Node*> GraphTest::IsTrueConstant() { |
98 return IsHeapConstant(factory()->true_value()); | 98 return IsHeapConstant(factory()->true_value()); |
99 } | 99 } |
100 | 100 |
| 101 Matcher<Node*> GraphTest::IsNullConstant() { |
| 102 return IsHeapConstant(factory()->null_value()); |
| 103 } |
101 | 104 |
102 Matcher<Node*> GraphTest::IsUndefinedConstant() { | 105 Matcher<Node*> GraphTest::IsUndefinedConstant() { |
103 return IsHeapConstant(factory()->undefined_value()); | 106 return IsHeapConstant(factory()->undefined_value()); |
104 } | 107 } |
105 | 108 |
106 TypedGraphTest::TypedGraphTest(int num_parameters) | 109 TypedGraphTest::TypedGraphTest(int num_parameters) |
107 : GraphTest(num_parameters), typer_(isolate(), Typer::kNoFlags, graph()) {} | 110 : GraphTest(num_parameters), typer_(isolate(), Typer::kNoFlags, graph()) {} |
108 | 111 |
109 TypedGraphTest::~TypedGraphTest() {} | 112 TypedGraphTest::~TypedGraphTest() {} |
110 | 113 |
(...skipping 20 matching lines...) Expand all Loading... |
131 EXPECT_LT(0u, n0->id()); | 134 EXPECT_LT(0u, n0->id()); |
132 EXPECT_LT(0u, n1->id()); | 135 EXPECT_LT(0u, n1->id()); |
133 EXPECT_NE(n0->id(), n1->id()); | 136 EXPECT_NE(n0->id(), n1->id()); |
134 EXPECT_EQ(&kDummyOperator, n0->op()); | 137 EXPECT_EQ(&kDummyOperator, n0->op()); |
135 EXPECT_EQ(&kDummyOperator, n1->op()); | 138 EXPECT_EQ(&kDummyOperator, n1->op()); |
136 } | 139 } |
137 | 140 |
138 } // namespace compiler | 141 } // namespace compiler |
139 } // namespace internal | 142 } // namespace internal |
140 } // namespace v8 | 143 } // namespace v8 |
OLD | NEW |