| 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::kIfException: |
| 232 case IrOpcode::kIfSuccess: { |
| 233 // IfException and IfSuccess 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. | 241 // Switch uses are Case. |
| 233 std::vector<bool> uses; | 242 std::vector<bool> uses; |
| 234 uses.resize(node->UseCount()); | 243 uses.resize(node->UseCount()); |
| 235 for (auto use : node->uses()) { | 244 for (auto use : node->uses()) { |
| 236 CHECK_EQ(IrOpcode::kCase, use->opcode()); | 245 CHECK_EQ(IrOpcode::kCase, use->opcode()); |
| 237 size_t const index = CaseIndexOf(use->op()); | 246 size_t const index = CaseIndexOf(use->op()); |
| 238 CHECK_LT(index, uses.size()); | 247 CHECK_LT(index, uses.size()); |
| 239 CHECK(!uses[index]); | 248 CHECK(!uses[index]); |
| 240 uses[index] = true; | 249 uses[index] = true; |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1022 // Check inputs for all nodes in the block. | 1031 // Check inputs for all nodes in the block. |
| 1023 for (size_t i = 0; i < block->NodeCount(); i++) { | 1032 for (size_t i = 0; i < block->NodeCount(); i++) { |
| 1024 Node* node = block->NodeAt(i); | 1033 Node* node = block->NodeAt(i); |
| 1025 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); | 1034 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); |
| 1026 } | 1035 } |
| 1027 } | 1036 } |
| 1028 } | 1037 } |
| 1029 } | 1038 } |
| 1030 } | 1039 } |
| 1031 } // namespace v8::internal::compiler | 1040 } // namespace v8::internal::compiler |
| OLD | NEW |