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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 | 52 |
53 | 53 |
54 Node* GraphTest::NumberConstant(volatile double value) { | 54 Node* GraphTest::NumberConstant(volatile double value) { |
55 return graph()->NewNode(common()->NumberConstant(value)); | 55 return graph()->NewNode(common()->NumberConstant(value)); |
56 } | 56 } |
57 | 57 |
58 | 58 |
59 Node* GraphTest::HeapConstant(const Handle<HeapObject>& value) { | 59 Node* GraphTest::HeapConstant(const Handle<HeapObject>& value) { |
60 Node* node = graph()->NewNode(common()->HeapConstant(value)); | 60 Node* node = graph()->NewNode(common()->HeapConstant(value)); |
61 Type* type = Type::HeapConstant(value, zone()); | 61 Type* type = Type::NewConstant(value, zone()); |
62 NodeProperties::SetType(node, type); | 62 NodeProperties::SetType(node, type); |
63 return node; | 63 return node; |
64 } | 64 } |
65 | 65 |
66 | 66 |
67 Node* GraphTest::FalseConstant() { | 67 Node* GraphTest::FalseConstant() { |
68 return HeapConstant(factory()->false_value()); | 68 return HeapConstant(factory()->false_value()); |
69 } | 69 } |
70 | 70 |
71 | 71 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 EXPECT_LT(0u, n0->id()); | 133 EXPECT_LT(0u, n0->id()); |
134 EXPECT_LT(0u, n1->id()); | 134 EXPECT_LT(0u, n1->id()); |
135 EXPECT_NE(n0->id(), n1->id()); | 135 EXPECT_NE(n0->id(), n1->id()); |
136 EXPECT_EQ(&kDummyOperator, n0->op()); | 136 EXPECT_EQ(&kDummyOperator, n0->op()); |
137 EXPECT_EQ(&kDummyOperator, n1->op()); | 137 EXPECT_EQ(&kDummyOperator, n1->op()); |
138 } | 138 } |
139 | 139 |
140 } // namespace compiler | 140 } // namespace compiler |
141 } // namespace internal | 141 } // namespace internal |
142 } // namespace v8 | 142 } // namespace v8 |
OLD | NEW |