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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 // Projection has an input that produces enough values. | 303 // Projection has an input that produces enough values. |
304 int index = OpParameter<int>(node->op()); | 304 int index = OpParameter<int>(node->op()); |
305 Node* input = NodeProperties::GetValueInput(node, 0); | 305 Node* input = NodeProperties::GetValueInput(node, 0); |
306 CHECK_GT(OperatorProperties::GetValueOutputCount(input->op()), index); | 306 CHECK_GT(OperatorProperties::GetValueOutputCount(input->op()), index); |
307 // Type can be anything. | 307 // Type can be anything. |
308 // TODO(rossberg): Introduce tuple types for this. | 308 // TODO(rossberg): Introduce tuple types for this. |
309 // TODO(titzer): Convince rossberg not to. | 309 // TODO(titzer): Convince rossberg not to. |
310 CheckUpperIs(node, Type::Any()); | 310 CheckUpperIs(node, Type::Any()); |
311 break; | 311 break; |
312 } | 312 } |
| 313 case IrOpcode::kSelect: { |
| 314 CHECK_EQ(0, effect_count); |
| 315 CHECK_EQ(0, control_count); |
| 316 CHECK_EQ(3, value_count); |
| 317 break; |
| 318 } |
313 case IrOpcode::kPhi: { | 319 case IrOpcode::kPhi: { |
314 // Phi input count matches parent control node. | 320 // Phi input count matches parent control node. |
315 CHECK_EQ(0, effect_count); | 321 CHECK_EQ(0, effect_count); |
316 CHECK_EQ(1, control_count); | 322 CHECK_EQ(1, control_count); |
317 Node* control = NodeProperties::GetControlInput(node, 0); | 323 Node* control = NodeProperties::GetControlInput(node, 0); |
318 CHECK_EQ(value_count, | 324 CHECK_EQ(value_count, |
319 OperatorProperties::GetControlInputCount(control->op())); | 325 OperatorProperties::GetControlInputCount(control->op())); |
320 CHECK_EQ(input_count, 1 + value_count); | 326 CHECK_EQ(input_count, 1 + value_count); |
321 // Type must be subsumed by all input types. | 327 // Type must be subsumed by all input types. |
322 // TODO(rossberg): for now at least, narrowing does not really hold. | 328 // TODO(rossberg): for now at least, narrowing does not really hold. |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 // Check inputs for all nodes in the block. | 976 // Check inputs for all nodes in the block. |
971 for (size_t i = 0; i < block->NodeCount(); i++) { | 977 for (size_t i = 0; i < block->NodeCount(); i++) { |
972 Node* node = block->NodeAt(i); | 978 Node* node = block->NodeAt(i); |
973 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); | 979 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); |
974 } | 980 } |
975 } | 981 } |
976 } | 982 } |
977 } | 983 } |
978 } | 984 } |
979 } // namespace v8::internal::compiler | 985 } // namespace v8::internal::compiler |
OLD | NEW |