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/compiler/escape-analysis.h" | 5 #include "src/compiler/escape-analysis.h" |
6 #include "src/bit-vector.h" | 6 #include "src/bit-vector.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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 control); | 112 control); |
113 } | 113 } |
114 | 114 |
115 Node* Return(Node* value, Node* effect = nullptr, Node* control = nullptr) { | 115 Node* Return(Node* value, Node* effect = nullptr, Node* control = nullptr) { |
116 if (!effect) { | 116 if (!effect) { |
117 effect = effect_; | 117 effect = effect_; |
118 } | 118 } |
119 if (!control) { | 119 if (!control) { |
120 control = control_; | 120 control = control_; |
121 } | 121 } |
122 Node* zero = graph()->NewNode(common()->Int32Constant(0)); | 122 Node* zero = graph()->NewNode(common()->NumberConstant(0)); |
123 return control_ = graph()->NewNode(common()->Return(), zero, value, effect, | 123 return control_ = graph()->NewNode(common()->Return(), zero, value, effect, |
124 control); | 124 control); |
125 } | 125 } |
126 | 126 |
127 void EndGraph() { | 127 void EndGraph() { |
128 for (Edge edge : graph()->end()->input_edges()) { | 128 for (Edge edge : graph()->end()->input_edges()) { |
129 if (NodeProperties::IsControlEdge(edge)) { | 129 if (NodeProperties::IsControlEdge(edge)) { |
130 edge.UpdateTo(control_); | 130 edge.UpdateTo(control_); |
131 } | 131 } |
132 } | 132 } |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 ASSERT_EQ(object1, NodeProperties::GetValueInput(object_state, 0)); | 510 ASSERT_EQ(object1, NodeProperties::GetValueInput(object_state, 0)); |
511 ASSERT_EQ(object_state, NodeProperties::GetValueInput(object_state, 1)); | 511 ASSERT_EQ(object_state, NodeProperties::GetValueInput(object_state, 1)); |
512 | 512 |
513 Node* object_state2 = NodeProperties::GetValueInput(state_values1, 0); | 513 Node* object_state2 = NodeProperties::GetValueInput(state_values1, 0); |
514 ASSERT_EQ(object_state, object_state2); | 514 ASSERT_EQ(object_state, object_state2); |
515 } | 515 } |
516 | 516 |
517 } // namespace compiler | 517 } // namespace compiler |
518 } // namespace internal | 518 } // namespace internal |
519 } // namespace v8 | 519 } // namespace v8 |
OLD | NEW |