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 | 10 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 // static | 158 // static |
159 void NodeProperties::ReplaceFrameStateInput(Node* node, int index, | 159 void NodeProperties::ReplaceFrameStateInput(Node* node, int index, |
160 Node* frame_state) { | 160 Node* frame_state) { |
161 DCHECK_LT(index, OperatorProperties::GetFrameStateInputCount(node->op())); | 161 DCHECK_LT(index, OperatorProperties::GetFrameStateInputCount(node->op())); |
162 node->ReplaceInput(FirstFrameStateIndex(node) + index, frame_state); | 162 node->ReplaceInput(FirstFrameStateIndex(node) + index, frame_state); |
163 } | 163 } |
164 | 164 |
165 | 165 |
166 // static | 166 // static |
| 167 void NodeProperties::RemoveFrameStateInput(Node* node, int index) { |
| 168 DCHECK_LT(index, OperatorProperties::GetFrameStateInputCount(node->op())); |
| 169 node->RemoveInput(FirstFrameStateIndex(node) + index); |
| 170 } |
| 171 |
| 172 |
| 173 // static |
167 void NodeProperties::RemoveNonValueInputs(Node* node) { | 174 void NodeProperties::RemoveNonValueInputs(Node* node) { |
168 node->TrimInputCount(node->op()->ValueInputCount()); | 175 node->TrimInputCount(node->op()->ValueInputCount()); |
169 } | 176 } |
170 | 177 |
171 | 178 |
172 void NodeProperties::MergeControlToEnd(Graph* graph, | 179 void NodeProperties::MergeControlToEnd(Graph* graph, |
173 CommonOperatorBuilder* common, | 180 CommonOperatorBuilder* common, |
174 Node* node) { | 181 Node* node) { |
175 graph->end()->AppendInput(graph->zone(), node); | 182 graph->end()->AppendInput(graph->zone(), node); |
176 graph->end()->set_op(common->End(graph->end()->InputCount())); | 183 graph->end()->set_op(common->End(graph->end()->InputCount())); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 // static | 295 // static |
289 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { | 296 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { |
290 if (num == 0) return false; | 297 if (num == 0) return false; |
291 int const index = edge.index(); | 298 int const index = edge.index(); |
292 return first <= index && index < first + num; | 299 return first <= index && index < first + num; |
293 } | 300 } |
294 | 301 |
295 } // namespace compiler | 302 } // namespace compiler |
296 } // namespace internal | 303 } // namespace internal |
297 } // namespace v8 | 304 } // namespace v8 |
OLD | NEW |