| 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 CheckNotTyped(node); | 221 CheckNotTyped(node); |
| 222 break; | 222 break; |
| 223 } | 223 } |
| 224 case IrOpcode::kIfTrue: | 224 case IrOpcode::kIfTrue: |
| 225 case IrOpcode::kIfFalse: | 225 case IrOpcode::kIfFalse: |
| 226 CHECK_EQ(IrOpcode::kBranch, | 226 CHECK_EQ(IrOpcode::kBranch, |
| 227 NodeProperties::GetControlInput(node, 0)->opcode()); | 227 NodeProperties::GetControlInput(node, 0)->opcode()); |
| 228 // Type is empty. | 228 // Type is empty. |
| 229 CheckNotTyped(node); | 229 CheckNotTyped(node); |
| 230 break; | 230 break; |
| 231 case IrOpcode::kIfSuccess: |
| 232 case IrOpcode::kIfException: { |
| 233 // IfSuccess and IfException continuation only on throwing nodes. |
| 234 Node* input = NodeProperties::GetControlInput(node, 0); |
| 235 CHECK(!input->op()->HasProperty(Operator::kNoThrow)); |
| 236 // Type is empty. |
| 237 CheckNotTyped(node); |
| 238 break; |
| 239 } |
| 231 case IrOpcode::kSwitch: { | 240 case IrOpcode::kSwitch: { |
| 232 // Switch uses are Case and Default. | 241 // Switch uses are Case and Default. |
| 233 int count_case = 0, count_default = 0; | 242 int count_case = 0, count_default = 0; |
| 234 for (auto use : node->uses()) { | 243 for (auto use : node->uses()) { |
| 235 switch (use->opcode()) { | 244 switch (use->opcode()) { |
| 236 case IrOpcode::kIfValue: { | 245 case IrOpcode::kIfValue: { |
| 237 for (auto user : node->uses()) { | 246 for (auto user : node->uses()) { |
| 238 if (user != use && user->opcode() == IrOpcode::kIfValue) { | 247 if (user != use && user->opcode() == IrOpcode::kIfValue) { |
| 239 CHECK_NE(OpParameter<int32_t>(use->op()), | 248 CHECK_NE(OpParameter<int32_t>(use->op()), |
| 240 OpParameter<int32_t>(user->op())); | 249 OpParameter<int32_t>(user->op())); |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 // Check inputs for all nodes in the block. | 1049 // Check inputs for all nodes in the block. |
| 1041 for (size_t i = 0; i < block->NodeCount(); i++) { | 1050 for (size_t i = 0; i < block->NodeCount(); i++) { |
| 1042 Node* node = block->NodeAt(i); | 1051 Node* node = block->NodeAt(i); |
| 1043 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); | 1052 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); |
| 1044 } | 1053 } |
| 1045 } | 1054 } |
| 1046 } | 1055 } |
| 1047 } | 1056 } |
| 1048 } | 1057 } |
| 1049 } // namespace v8::internal::compiler | 1058 } // namespace v8::internal::compiler |
| OLD | NEW |