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 "test/unittests/compiler/node-test-utils.h" | 8 #include "test/unittests/compiler/node-test-utils.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 103 } |
104 | 104 |
105 | 105 |
106 Matcher<Node*> GraphTest::IsUndefinedConstant() { | 106 Matcher<Node*> GraphTest::IsUndefinedConstant() { |
107 return IsHeapConstant( | 107 return IsHeapConstant( |
108 Unique<HeapObject>::CreateImmovable(factory()->undefined_value())); | 108 Unique<HeapObject>::CreateImmovable(factory()->undefined_value())); |
109 } | 109 } |
110 | 110 |
111 | 111 |
112 TypedGraphTest::TypedGraphTest(int num_parameters) | 112 TypedGraphTest::TypedGraphTest(int num_parameters) |
113 : GraphTest(num_parameters), | 113 : GraphTest(num_parameters), typer_(isolate(), graph()) {} |
114 typer_(isolate(), graph(), nullptr, MaybeHandle<Context>()) {} | |
115 | 114 |
116 | 115 |
117 TypedGraphTest::~TypedGraphTest() {} | 116 TypedGraphTest::~TypedGraphTest() {} |
118 | 117 |
119 | 118 |
120 Node* TypedGraphTest::Parameter(Type* type, int32_t index) { | 119 Node* TypedGraphTest::Parameter(Type* type, int32_t index) { |
121 Node* node = GraphTest::Parameter(index); | 120 Node* node = GraphTest::Parameter(index); |
122 NodeProperties::SetBounds(node, Bounds(type)); | 121 NodeProperties::SetBounds(node, Bounds(type)); |
123 return node; | 122 return node; |
124 } | 123 } |
(...skipping 14 matching lines...) Expand all Loading... |
139 EXPECT_LT(0u, n0->id()); | 138 EXPECT_LT(0u, n0->id()); |
140 EXPECT_LT(0u, n1->id()); | 139 EXPECT_LT(0u, n1->id()); |
141 EXPECT_NE(n0->id(), n1->id()); | 140 EXPECT_NE(n0->id(), n1->id()); |
142 EXPECT_EQ(&kDummyOperator, n0->op()); | 141 EXPECT_EQ(&kDummyOperator, n0->op()); |
143 EXPECT_EQ(&kDummyOperator, n1->op()); | 142 EXPECT_EQ(&kDummyOperator, n1->op()); |
144 } | 143 } |
145 | 144 |
146 } // namespace compiler | 145 } // namespace compiler |
147 } // namespace internal | 146 } // namespace internal |
148 } // namespace v8 | 147 } // namespace v8 |
OLD | NEW |