OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/verifier.h" | 5 #include "src/compiler/verifier.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <deque> | 8 #include <deque> |
9 #include <queue> | 9 #include <queue> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1438 AllNodes all(&zone, graph); | 1438 AllNodes all(&zone, graph); |
1439 for (Node* node : all.reachable) visitor.Check(node); | 1439 for (Node* node : all.reachable) visitor.Check(node); |
1440 | 1440 |
1441 // Check the uniqueness of projections. | 1441 // Check the uniqueness of projections. |
1442 for (Node* proj : all.reachable) { | 1442 for (Node* proj : all.reachable) { |
1443 if (proj->opcode() != IrOpcode::kProjection) continue; | 1443 if (proj->opcode() != IrOpcode::kProjection) continue; |
1444 Node* node = proj->InputAt(0); | 1444 Node* node = proj->InputAt(0); |
1445 for (Node* other : node->uses()) { | 1445 for (Node* other : node->uses()) { |
1446 if (all.IsLive(other) && other != proj && | 1446 if (all.IsLive(other) && other != proj && |
1447 other->opcode() == IrOpcode::kProjection && | 1447 other->opcode() == IrOpcode::kProjection && |
| 1448 other->InputAt(0) == node && |
1448 ProjectionIndexOf(other->op()) == ProjectionIndexOf(proj->op())) { | 1449 ProjectionIndexOf(other->op()) == ProjectionIndexOf(proj->op())) { |
1449 V8_Fatal(__FILE__, __LINE__, | 1450 V8_Fatal(__FILE__, __LINE__, |
1450 "Node #%d:%s has duplicate projections #%d and #%d", | 1451 "Node #%d:%s has duplicate projections #%d and #%d", |
1451 node->id(), node->op()->mnemonic(), proj->id(), other->id()); | 1452 node->id(), node->op()->mnemonic(), proj->id(), other->id()); |
1452 } | 1453 } |
1453 } | 1454 } |
1454 } | 1455 } |
1455 } | 1456 } |
1456 | 1457 |
1457 | 1458 |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1746 replacement->op()->EffectOutputCount() > 0); | 1747 replacement->op()->EffectOutputCount() > 0); |
1747 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || | 1748 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || |
1748 replacement->opcode() == IrOpcode::kFrameState); | 1749 replacement->opcode() == IrOpcode::kFrameState); |
1749 } | 1750 } |
1750 | 1751 |
1751 #endif // DEBUG | 1752 #endif // DEBUG |
1752 | 1753 |
1753 } // namespace compiler | 1754 } // namespace compiler |
1754 } // namespace internal | 1755 } // namespace internal |
1755 } // namespace v8 | 1756 } // namespace v8 |
OLD | NEW |