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 #include <sstream> | 9 #include <sstream> |
10 #include <string> | 10 #include <string> |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 case IrOpcode::kReturn: | 236 case IrOpcode::kReturn: |
237 // TODO(rossberg): check successor is End | 237 // TODO(rossberg): check successor is End |
238 // Type is empty. | 238 // Type is empty. |
239 CheckNotTyped(node); | 239 CheckNotTyped(node); |
240 break; | 240 break; |
241 case IrOpcode::kThrow: | 241 case IrOpcode::kThrow: |
242 // TODO(rossberg): what are the constraints on these? | 242 // TODO(rossberg): what are the constraints on these? |
243 // Type is empty. | 243 // Type is empty. |
244 CheckNotTyped(node); | 244 CheckNotTyped(node); |
245 break; | 245 break; |
| 246 case IrOpcode::kTerminate: |
| 247 // Type is empty. |
| 248 CheckNotTyped(node); |
| 249 CHECK_EQ(1, control_count); |
| 250 CHECK_EQ(input_count, 1 + effect_count); |
| 251 break; |
246 | 252 |
247 // Common operators | 253 // Common operators |
248 // ---------------- | 254 // ---------------- |
249 case IrOpcode::kParameter: { | 255 case IrOpcode::kParameter: { |
250 // Parameters have the start node as inputs. | 256 // Parameters have the start node as inputs. |
251 CHECK_EQ(1, input_count); | 257 CHECK_EQ(1, input_count); |
252 CHECK_EQ(IrOpcode::kStart, | 258 CHECK_EQ(IrOpcode::kStart, |
253 NodeProperties::GetValueInput(node, 0)->opcode()); | 259 NodeProperties::GetValueInput(node, 0)->opcode()); |
254 // Parameter has an input that produces enough values. | 260 // Parameter has an input that produces enough values. |
255 int index = OpParameter<int>(node); | 261 int index = OpParameter<int>(node); |
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 // Check inputs for all nodes in the block. | 966 // Check inputs for all nodes in the block. |
961 for (size_t i = 0; i < block->NodeCount(); i++) { | 967 for (size_t i = 0; i < block->NodeCount(); i++) { |
962 Node* node = block->NodeAt(i); | 968 Node* node = block->NodeAt(i); |
963 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); | 969 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); |
964 } | 970 } |
965 } | 971 } |
966 } | 972 } |
967 } | 973 } |
968 } | 974 } |
969 } // namespace v8::internal::compiler | 975 } // namespace v8::internal::compiler |
OLD | NEW |