Chromium Code Reviews| Index: src/compiler/control-reducer.cc |
| diff --git a/src/compiler/control-reducer.cc b/src/compiler/control-reducer.cc |
| index df302dd8ed838f37c6d7045cdea78d2be6b1c3b5..ce1951eb8ccd1df0f4bf58dd983d953a75031a01 100644 |
| --- a/src/compiler/control-reducer.cc |
| +++ b/src/compiler/control-reducer.cc |
| @@ -291,12 +291,23 @@ class ControlReducerImpl { |
| } |
| #if DEBUG |
| // Verify that no inputs to live nodes are NULL. |
| - for (size_t j = 0; j < nodes.size(); j++) { |
| - Node* node = nodes[j]; |
| - for (Node* const input : node->inputs()) { |
| - CHECK(input); |
| + for (Node* node : nodes) { |
| + for (int index = 0; index < node->InputCount(); index++) { |
| + Node* input = node->InputAt(index); |
| + if (input == nullptr) { |
| + std::ostringstream str; |
| + str << "GraphError: node #" << node->id() << ":" << *node->op() |
| + << "(input @" << index << ") == null"; |
| + V8_Fatal(__FILE__, __LINE__, str.str().c_str()); |
|
Michael Starzinger
2015/02/18 17:37:32
Please use the "FATAL" macro here instead of inlin
titzer
2015/02/19 09:53:04
Done (here and below).
|
| + } |
| + if (input->opcode() == IrOpcode::kDead) { |
| + std::ostringstream str; |
| + str << "GraphError: node #" << node->id() << ":" << *node->op() |
| + << "(input @" << index << ") == dead"; |
| + V8_Fatal(__FILE__, __LINE__, str.str().c_str()); |
|
Michael Starzinger
2015/02/18 17:37:32
Please use the "FATAL" macro here instead of inlin
|
| + } |
| } |
| - for (Node* const use : node->uses()) { |
| + for (Node* use : node->uses()) { |
| CHECK(marked.IsReachableFromEnd(use)); |
| } |
| } |