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 <deque> | 7 #include <deque> |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "src/compiler/generic-algorithm.h" | 10 #include "src/compiler/generic-algorithm.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 CHECK(!OperatorProperties::HasControlOutput(node->op())); | 159 CHECK(!OperatorProperties::HasControlOutput(node->op())); |
160 // Type is empty. | 160 // Type is empty. |
161 CHECK(!NodeProperties::IsTyped(node)); | 161 CHECK(!NodeProperties::IsTyped(node)); |
162 break; | 162 break; |
163 case IrOpcode::kDead: | 163 case IrOpcode::kDead: |
164 // Dead is never connected to the graph. | 164 // Dead is never connected to the graph. |
165 UNREACHABLE(); | 165 UNREACHABLE(); |
166 case IrOpcode::kBranch: { | 166 case IrOpcode::kBranch: { |
167 // Branch uses are IfTrue and IfFalse. | 167 // Branch uses are IfTrue and IfFalse. |
168 Node::Uses uses = node->uses(); | 168 Node::Uses uses = node->uses(); |
169 bool count_true = 0, count_false = 0; | 169 int count_true = 0, count_false = 0; |
170 for (Node::Uses::iterator it = uses.begin(); it != uses.end(); ++it) { | 170 for (Node::Uses::iterator it = uses.begin(); it != uses.end(); ++it) { |
171 CHECK((*it)->opcode() == IrOpcode::kIfTrue || | 171 CHECK((*it)->opcode() == IrOpcode::kIfTrue || |
172 (*it)->opcode() == IrOpcode::kIfFalse); | 172 (*it)->opcode() == IrOpcode::kIfFalse); |
173 if ((*it)->opcode() == IrOpcode::kIfTrue) ++count_true; | 173 if ((*it)->opcode() == IrOpcode::kIfTrue) ++count_true; |
174 if ((*it)->opcode() == IrOpcode::kIfFalse) ++count_false; | 174 if ((*it)->opcode() == IrOpcode::kIfFalse) ++count_false; |
175 } | 175 } |
176 CHECK(count_true == 1 && count_false == 1); | 176 CHECK(count_true == 1 && count_false == 1); |
177 // Type is empty. | 177 // Type is empty. |
178 CHECK(!NodeProperties::IsTyped(node)); | 178 CHECK(!NodeProperties::IsTyped(node)); |
179 break; | 179 break; |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 // Check inputs for all nodes in the block. | 885 // Check inputs for all nodes in the block. |
886 for (size_t i = 0; i < block->NodeCount(); i++) { | 886 for (size_t i = 0; i < block->NodeCount(); i++) { |
887 Node* node = block->NodeAt(i); | 887 Node* node = block->NodeAt(i); |
888 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); | 888 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); |
889 } | 889 } |
890 } | 890 } |
891 } | 891 } |
892 } | 892 } |
893 } | 893 } |
894 } // namespace v8::internal::compiler | 894 } // namespace v8::internal::compiler |
OLD | NEW |