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