| 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 } | 388 } |
| 389 case IrOpcode::kEffectPhi: { | 389 case IrOpcode::kEffectPhi: { |
| 390 // EffectPhi input count matches parent control node. | 390 // EffectPhi input count matches parent control node. |
| 391 CHECK_EQ(0, value_count); | 391 CHECK_EQ(0, value_count); |
| 392 CHECK_EQ(1, control_count); | 392 CHECK_EQ(1, control_count); |
| 393 Node* control = NodeProperties::GetControlInput(node, 0); | 393 Node* control = NodeProperties::GetControlInput(node, 0); |
| 394 CHECK_EQ(effect_count, control->op()->ControlInputCount()); | 394 CHECK_EQ(effect_count, control->op()->ControlInputCount()); |
| 395 CHECK_EQ(input_count, 1 + effect_count); | 395 CHECK_EQ(input_count, 1 + effect_count); |
| 396 break; | 396 break; |
| 397 } | 397 } |
| 398 case IrOpcode::kLoopExit: { |
| 399 CHECK_EQ(2, control_count); |
| 400 Node* loop = NodeProperties::GetControlInput(node, 1); |
| 401 CHECK_EQ(IrOpcode::kLoop, loop->opcode()); |
| 402 break; |
| 403 } |
| 404 case IrOpcode::kLoopExitValue: { |
| 405 CHECK_EQ(1, control_count); |
| 406 Node* loop_exit = NodeProperties::GetControlInput(node, 0); |
| 407 CHECK_EQ(IrOpcode::kLoopExit, loop_exit->opcode()); |
| 408 break; |
| 409 } |
| 410 case IrOpcode::kLoopExitEffect: { |
| 411 CHECK_EQ(1, control_count); |
| 412 Node* loop_exit = NodeProperties::GetControlInput(node, 0); |
| 413 CHECK_EQ(IrOpcode::kLoopExit, loop_exit->opcode()); |
| 414 break; |
| 415 } |
| 398 case IrOpcode::kCheckpoint: | 416 case IrOpcode::kCheckpoint: |
| 399 // Type is empty. | 417 // Type is empty. |
| 400 CheckNotTyped(node); | 418 CheckNotTyped(node); |
| 401 break; | 419 break; |
| 402 case IrOpcode::kBeginRegion: | 420 case IrOpcode::kBeginRegion: |
| 403 // TODO(rossberg): what are the constraints on these? | 421 // TODO(rossberg): what are the constraints on these? |
| 404 break; | 422 break; |
| 405 case IrOpcode::kFinishRegion: { | 423 case IrOpcode::kFinishRegion: { |
| 406 // TODO(rossberg): what are the constraints on these? | 424 // TODO(rossberg): what are the constraints on these? |
| 407 // Type must be subsumed by input type. | 425 // Type must be subsumed by input type. |
| (...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1486 replacement->op()->EffectOutputCount() > 0); | 1504 replacement->op()->EffectOutputCount() > 0); |
| 1487 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || | 1505 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || |
| 1488 replacement->opcode() == IrOpcode::kFrameState); | 1506 replacement->opcode() == IrOpcode::kFrameState); |
| 1489 } | 1507 } |
| 1490 | 1508 |
| 1491 #endif // DEBUG | 1509 #endif // DEBUG |
| 1492 | 1510 |
| 1493 } // namespace compiler | 1511 } // namespace compiler |
| 1494 } // namespace internal | 1512 } // namespace internal |
| 1495 } // namespace v8 | 1513 } // namespace v8 |
| OLD | NEW |