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/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
6 #include "src/compiler/graph.h" | 6 #include "src/compiler/graph.h" |
7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
8 #include "src/compiler/operator-properties.h" | 8 #include "src/compiler/operator-properties.h" |
9 #include "src/compiler/verifier.h" | 9 #include "src/compiler/verifier.h" |
10 #include "src/types-inl.h" | 10 #include "src/types-inl.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 node->RemoveInput(FirstFrameStateIndex(node) + index); | 170 node->RemoveInput(FirstFrameStateIndex(node) + index); |
171 } | 171 } |
172 | 172 |
173 | 173 |
174 // static | 174 // static |
175 void NodeProperties::RemoveNonValueInputs(Node* node) { | 175 void NodeProperties::RemoveNonValueInputs(Node* node) { |
176 node->TrimInputCount(node->op()->ValueInputCount()); | 176 node->TrimInputCount(node->op()->ValueInputCount()); |
177 } | 177 } |
178 | 178 |
179 | 179 |
| 180 // static |
| 181 void NodeProperties::RemoveValueInputs(Node* node) { |
| 182 int value_input_count = node->op()->ValueInputCount(); |
| 183 while (--value_input_count >= 0) { |
| 184 node->RemoveInput(value_input_count); |
| 185 } |
| 186 } |
| 187 |
| 188 |
180 void NodeProperties::MergeControlToEnd(Graph* graph, | 189 void NodeProperties::MergeControlToEnd(Graph* graph, |
181 CommonOperatorBuilder* common, | 190 CommonOperatorBuilder* common, |
182 Node* node) { | 191 Node* node) { |
183 graph->end()->AppendInput(graph->zone(), node); | 192 graph->end()->AppendInput(graph->zone(), node); |
184 graph->end()->set_op(common->End(graph->end()->InputCount())); | 193 graph->end()->set_op(common->End(graph->end()->InputCount())); |
185 } | 194 } |
186 | 195 |
187 | 196 |
188 // static | 197 // static |
189 void NodeProperties::ReplaceUses(Node* node, Node* value, Node* effect, | 198 void NodeProperties::ReplaceUses(Node* node, Node* value, Node* effect, |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 // static | 311 // static |
303 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { | 312 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { |
304 if (num == 0) return false; | 313 if (num == 0) return false; |
305 int const index = edge.index(); | 314 int const index = edge.index(); |
306 return first <= index && index < first + num; | 315 return first <= index && index < first + num; |
307 } | 316 } |
308 | 317 |
309 } // namespace compiler | 318 } // namespace compiler |
310 } // namespace internal | 319 } // namespace internal |
311 } // namespace v8 | 320 } // namespace v8 |
OLD | NEW |