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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 // Type is Receiver. | 557 // Type is Receiver. |
558 CheckUpperIs(node, Type::Receiver()); | 558 CheckUpperIs(node, Type::Receiver()); |
559 break; | 559 break; |
560 case IrOpcode::kJSCallFunction: | 560 case IrOpcode::kJSCallFunction: |
561 case IrOpcode::kJSCallRuntime: | 561 case IrOpcode::kJSCallRuntime: |
562 case IrOpcode::kJSYield: | 562 case IrOpcode::kJSYield: |
563 // Type can be anything. | 563 // Type can be anything. |
564 CheckUpperIs(node, Type::Any()); | 564 CheckUpperIs(node, Type::Any()); |
565 break; | 565 break; |
566 | 566 |
| 567 case IrOpcode::kJSForInPrepare: { |
| 568 // TODO(bmeurer): What are the constraints on thse? |
| 569 CheckUpperIs(node, Type::Any()); |
| 570 break; |
| 571 } |
| 572 case IrOpcode::kJSForInDone: { |
| 573 CheckValueInputIs(node, 0, Type::UnsignedSmall()); |
| 574 break; |
| 575 } |
| 576 case IrOpcode::kJSForInNext: { |
| 577 CheckUpperIs(node, Type::Union(Type::Name(), Type::Undefined())); |
| 578 break; |
| 579 } |
| 580 case IrOpcode::kJSForInStep: { |
| 581 CheckValueInputIs(node, 0, Type::UnsignedSmall()); |
| 582 CheckUpperIs(node, Type::UnsignedSmall()); |
| 583 break; |
| 584 } |
| 585 |
567 case IrOpcode::kJSStackCheck: | 586 case IrOpcode::kJSStackCheck: |
568 // Type is empty. | 587 // Type is empty. |
569 CheckNotTyped(node); | 588 CheckNotTyped(node); |
570 break; | 589 break; |
571 | 590 |
572 // Simplified operators | 591 // Simplified operators |
573 // ------------------------------- | 592 // ------------------------------- |
574 case IrOpcode::kBooleanNot: | 593 case IrOpcode::kBooleanNot: |
575 // Boolean -> Boolean | 594 // Boolean -> Boolean |
576 CheckValueInputIs(node, 0, Type::Boolean()); | 595 CheckValueInputIs(node, 0, Type::Boolean()); |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 // Check inputs for all nodes in the block. | 1121 // Check inputs for all nodes in the block. |
1103 for (size_t i = 0; i < block->NodeCount(); i++) { | 1122 for (size_t i = 0; i < block->NodeCount(); i++) { |
1104 Node* node = block->NodeAt(i); | 1123 Node* node = block->NodeAt(i); |
1105 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); | 1124 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); |
1106 } | 1125 } |
1107 } | 1126 } |
1108 } | 1127 } |
1109 } // namespace compiler | 1128 } // namespace compiler |
1110 } // namespace internal | 1129 } // namespace internal |
1111 } // namespace v8 | 1130 } // namespace v8 |
OLD | NEW |