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/js-operator.h" | 7 #include "src/compiler/js-operator.h" |
8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
10 #include "src/compiler/operator-properties.h" | 10 #include "src/compiler/operator-properties.h" |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 void NodeProperties::ChangeOp(Node* node, const Operator* new_op) { | 232 void NodeProperties::ChangeOp(Node* node, const Operator* new_op) { |
233 node->set_op(new_op); | 233 node->set_op(new_op); |
234 Verifier::VerifyNode(node); | 234 Verifier::VerifyNode(node); |
235 } | 235 } |
236 | 236 |
237 | 237 |
238 // static | 238 // static |
239 Node* NodeProperties::FindFrameStateBefore(Node* node) { | 239 Node* NodeProperties::FindFrameStateBefore(Node* node) { |
240 Node* effect = NodeProperties::GetEffectInput(node); | 240 Node* effect = NodeProperties::GetEffectInput(node); |
241 while (effect->opcode() != IrOpcode::kCheckpoint) { | 241 while (effect->opcode() != IrOpcode::kCheckpoint) { |
| 242 if (effect->opcode() == IrOpcode::kDead) return effect; |
242 DCHECK_EQ(1, effect->op()->EffectInputCount()); | 243 DCHECK_EQ(1, effect->op()->EffectInputCount()); |
243 effect = NodeProperties::GetEffectInput(effect); | 244 effect = NodeProperties::GetEffectInput(effect); |
244 } | 245 } |
245 Node* frame_state = GetFrameStateInput(effect, 0); | 246 Node* frame_state = GetFrameStateInput(effect, 0); |
246 return frame_state; | 247 return frame_state; |
247 } | 248 } |
248 | 249 |
249 // static | 250 // static |
250 Node* NodeProperties::FindProjection(Node* node, size_t projection_index) { | 251 Node* NodeProperties::FindProjection(Node* node, size_t projection_index) { |
251 for (auto use : node->uses()) { | 252 for (auto use : node->uses()) { |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 // static | 425 // static |
425 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { | 426 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { |
426 if (num == 0) return false; | 427 if (num == 0) return false; |
427 int const index = edge.index(); | 428 int const index = edge.index(); |
428 return first <= index && index < first + num; | 429 return first <= index && index < first + num; |
429 } | 430 } |
430 | 431 |
431 } // namespace compiler | 432 } // namespace compiler |
432 } // namespace internal | 433 } // namespace internal |
433 } // namespace v8 | 434 } // namespace v8 |
OLD | NEW |