OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 "src/bit-vector.h" | 5 #include "src/bit-vector.h" |
6 #include "src/compiler/escape-analysis.h" | 6 #include "src/compiler/escape-analysis.h" |
7 #include "src/compiler/escape-analysis-reducer.h" | 7 #include "src/compiler/escape-analysis-reducer.h" |
8 #include "src/compiler/graph-visualizer.h" | 8 #include "src/compiler/graph-visualizer.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 } | 126 } |
127 | 127 |
128 Node* IfFalse() { return graph()->NewNode(common()->IfFalse(), control_); } | 128 Node* IfFalse() { return graph()->NewNode(common()->IfFalse(), control_); } |
129 | 129 |
130 Node* Merge2(Node* control1, Node* control2) { | 130 Node* Merge2(Node* control1, Node* control2) { |
131 return control_ = graph()->NewNode(common()->Merge(2), control1, control2); | 131 return control_ = graph()->NewNode(common()->Merge(2), control1, control2); |
132 } | 132 } |
133 | 133 |
134 FieldAccess AccessAtIndex(int offset) { | 134 FieldAccess AccessAtIndex(int offset) { |
135 FieldAccess access = {kTaggedBase, offset, MaybeHandle<Name>(), Type::Any(), | 135 FieldAccess access = {kTaggedBase, offset, MaybeHandle<Name>(), Type::Any(), |
136 kMachAnyTagged}; | 136 MachineType::AnyTagged()}; |
137 return access; | 137 return access; |
138 } | 138 } |
139 | 139 |
140 // ---------------------------------Assertion Helper-------------------------- | 140 // ---------------------------------Assertion Helper-------------------------- |
141 | 141 |
142 void ExpectReplacement(Node* node, Node* rep) { | 142 void ExpectReplacement(Node* node, Node* rep) { |
143 EXPECT_EQ(rep, escape_analysis()->GetReplacement(node, node->id())); | 143 EXPECT_EQ(rep, escape_analysis()->GetReplacement(node, node->id())); |
144 } | 144 } |
145 | 145 |
146 void ExpectReplacementPhi(Node* node, Node* left, Node* right) { | 146 void ExpectReplacementPhi(Node* node, Node* left, Node* right) { |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 ExpectReplacement(load2, object1); | 296 ExpectReplacement(load2, object1); |
297 | 297 |
298 Transformation(); | 298 Transformation(); |
299 | 299 |
300 ASSERT_EQ(object1, NodeProperties::GetValueInput(result, 0)); | 300 ASSERT_EQ(object1, NodeProperties::GetValueInput(result, 0)); |
301 } | 301 } |
302 | 302 |
303 } // namespace compiler | 303 } // namespace compiler |
304 } // namespace internal | 304 } // namespace internal |
305 } // namespace v8 | 305 } // namespace v8 |
OLD | NEW |