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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 case IrOpcode::kNumberSubtract: | 626 case IrOpcode::kNumberSubtract: |
627 case IrOpcode::kNumberMultiply: | 627 case IrOpcode::kNumberMultiply: |
628 case IrOpcode::kNumberDivide: | 628 case IrOpcode::kNumberDivide: |
629 case IrOpcode::kNumberModulus: | 629 case IrOpcode::kNumberModulus: |
630 // (Number, Number) -> Number | 630 // (Number, Number) -> Number |
631 CheckValueInputIs(node, 0, Type::Number()); | 631 CheckValueInputIs(node, 0, Type::Number()); |
632 CheckValueInputIs(node, 1, Type::Number()); | 632 CheckValueInputIs(node, 1, Type::Number()); |
633 // TODO(rossberg): activate once we retype after opcode changes. | 633 // TODO(rossberg): activate once we retype after opcode changes. |
634 // CheckUpperIs(node, Type::Number()); | 634 // CheckUpperIs(node, Type::Number()); |
635 break; | 635 break; |
| 636 case IrOpcode::kNumberShiftLeft: |
| 637 case IrOpcode::kNumberShiftRight: |
| 638 // (Signed32, Unsigned32) -> Signed32 |
| 639 CheckValueInputIs(node, 0, Type::Signed32()); |
| 640 CheckValueInputIs(node, 1, Type::Unsigned32()); |
| 641 CheckUpperIs(node, Type::Signed32()); |
| 642 break; |
| 643 case IrOpcode::kNumberShiftRightLogical: |
| 644 // (Unsigned32, Unsigned32) -> Unsigned32 |
| 645 CheckValueInputIs(node, 0, Type::Unsigned32()); |
| 646 CheckValueInputIs(node, 1, Type::Unsigned32()); |
| 647 CheckUpperIs(node, Type::Unsigned32()); |
| 648 break; |
636 case IrOpcode::kNumberToInt32: | 649 case IrOpcode::kNumberToInt32: |
637 // Number -> Signed32 | 650 // Number -> Signed32 |
638 CheckValueInputIs(node, 0, Type::Number()); | 651 CheckValueInputIs(node, 0, Type::Number()); |
639 CheckUpperIs(node, Type::Signed32()); | 652 CheckUpperIs(node, Type::Signed32()); |
640 break; | 653 break; |
641 case IrOpcode::kNumberToUint32: | 654 case IrOpcode::kNumberToUint32: |
642 // Number -> Unsigned32 | 655 // Number -> Unsigned32 |
643 CheckValueInputIs(node, 0, Type::Number()); | 656 CheckValueInputIs(node, 0, Type::Number()); |
644 CheckUpperIs(node, Type::Unsigned32()); | 657 CheckUpperIs(node, Type::Unsigned32()); |
645 break; | 658 break; |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 // Check inputs for all nodes in the block. | 1144 // Check inputs for all nodes in the block. |
1132 for (size_t i = 0; i < block->NodeCount(); i++) { | 1145 for (size_t i = 0; i < block->NodeCount(); i++) { |
1133 Node* node = block->NodeAt(i); | 1146 Node* node = block->NodeAt(i); |
1134 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); | 1147 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); |
1135 } | 1148 } |
1136 } | 1149 } |
1137 } | 1150 } |
1138 } // namespace compiler | 1151 } // namespace compiler |
1139 } // namespace internal | 1152 } // namespace internal |
1140 } // namespace v8 | 1153 } // namespace v8 |
OLD | NEW |