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/simplified-lowering.h" | 5 #include "src/compiler/simplified-lowering.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
10 #include "src/compiler/graph-inl.h" | 10 #include "src/compiler/graph-inl.h" |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 return VisitBinop(node, kRepWord32, kRepWord32 | kTypeInt32); | 645 return VisitBinop(node, kRepWord32, kRepWord32 | kTypeInt32); |
646 case IrOpcode::kWord32Equal: | 646 case IrOpcode::kWord32Equal: |
647 return VisitBinop(node, kRepWord32, kRepBit); | 647 return VisitBinop(node, kRepWord32, kRepBit); |
648 | 648 |
649 case IrOpcode::kInt32Add: | 649 case IrOpcode::kInt32Add: |
650 case IrOpcode::kInt32Sub: | 650 case IrOpcode::kInt32Sub: |
651 case IrOpcode::kInt32Mul: | 651 case IrOpcode::kInt32Mul: |
652 case IrOpcode::kInt32Div: | 652 case IrOpcode::kInt32Div: |
653 case IrOpcode::kInt32Mod: | 653 case IrOpcode::kInt32Mod: |
654 return VisitInt32Binop(node); | 654 return VisitInt32Binop(node); |
655 case IrOpcode::kInt32UDiv: | 655 case IrOpcode::kUint32Div: |
656 case IrOpcode::kInt32UMod: | 656 case IrOpcode::kUint32Mod: |
657 return VisitUint32Binop(node); | 657 return VisitUint32Binop(node); |
658 case IrOpcode::kInt32LessThan: | 658 case IrOpcode::kInt32LessThan: |
659 case IrOpcode::kInt32LessThanOrEqual: | 659 case IrOpcode::kInt32LessThanOrEqual: |
660 return VisitInt32Cmp(node); | 660 return VisitInt32Cmp(node); |
661 | 661 |
662 case IrOpcode::kUint32LessThan: | 662 case IrOpcode::kUint32LessThan: |
663 case IrOpcode::kUint32LessThanOrEqual: | 663 case IrOpcode::kUint32LessThanOrEqual: |
664 return VisitUint32Cmp(node); | 664 return VisitUint32Cmp(node); |
665 | 665 |
666 case IrOpcode::kInt64Add: | 666 case IrOpcode::kInt64Add: |
667 case IrOpcode::kInt64Sub: | 667 case IrOpcode::kInt64Sub: |
668 case IrOpcode::kInt64Mul: | 668 case IrOpcode::kInt64Mul: |
669 case IrOpcode::kInt64Div: | 669 case IrOpcode::kInt64Div: |
670 case IrOpcode::kInt64Mod: | 670 case IrOpcode::kInt64Mod: |
671 return VisitInt64Binop(node); | 671 return VisitInt64Binop(node); |
672 case IrOpcode::kInt64LessThan: | 672 case IrOpcode::kInt64LessThan: |
673 case IrOpcode::kInt64LessThanOrEqual: | 673 case IrOpcode::kInt64LessThanOrEqual: |
674 return VisitInt64Cmp(node); | 674 return VisitInt64Cmp(node); |
675 | 675 |
676 case IrOpcode::kUint64LessThan: | 676 case IrOpcode::kUint64LessThan: |
677 return VisitUint64Cmp(node); | 677 return VisitUint64Cmp(node); |
678 | 678 |
679 case IrOpcode::kInt64UDiv: | 679 case IrOpcode::kUint64Div: |
680 case IrOpcode::kInt64UMod: | 680 case IrOpcode::kUint64Mod: |
681 return VisitUint64Binop(node); | 681 return VisitUint64Binop(node); |
682 | 682 |
683 case IrOpcode::kWord64And: | 683 case IrOpcode::kWord64And: |
684 case IrOpcode::kWord64Or: | 684 case IrOpcode::kWord64Or: |
685 case IrOpcode::kWord64Xor: | 685 case IrOpcode::kWord64Xor: |
686 case IrOpcode::kWord64Shl: | 686 case IrOpcode::kWord64Shl: |
687 case IrOpcode::kWord64Shr: | 687 case IrOpcode::kWord64Shr: |
688 case IrOpcode::kWord64Sar: | 688 case IrOpcode::kWord64Sar: |
689 return VisitBinop(node, kRepWord64, kRepWord64); | 689 return VisitBinop(node, kRepWord64, kRepWord64); |
690 case IrOpcode::kWord64Equal: | 690 case IrOpcode::kWord64Equal: |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { | 967 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { |
968 node->set_op(machine()->IntLessThanOrEqual()); | 968 node->set_op(machine()->IntLessThanOrEqual()); |
969 node->ReplaceInput(0, StringComparison(node, true)); | 969 node->ReplaceInput(0, StringComparison(node, true)); |
970 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 970 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
971 } | 971 } |
972 | 972 |
973 | 973 |
974 } // namespace compiler | 974 } // namespace compiler |
975 } // namespace internal | 975 } // namespace internal |
976 } // namespace v8 | 976 } // namespace v8 |
OLD | NEW |