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 <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 // => unsigned Uint32Mod | 711 // => unsigned Uint32Mod |
712 VisitUint32Binop(node); | 712 VisitUint32Binop(node); |
713 if (lower()) DeferReplacement(node, lowering->Uint32Mod(node)); | 713 if (lower()) DeferReplacement(node, lowering->Uint32Mod(node)); |
714 break; | 714 break; |
715 } | 715 } |
716 // => Float64Mod | 716 // => Float64Mod |
717 VisitFloat64Binop(node); | 717 VisitFloat64Binop(node); |
718 if (lower()) NodeProperties::ChangeOp(node, Float64Op(node)); | 718 if (lower()) NodeProperties::ChangeOp(node, Float64Op(node)); |
719 break; | 719 break; |
720 } | 720 } |
| 721 case IrOpcode::kNumberBitwiseOr: |
| 722 case IrOpcode::kNumberBitwiseXor: |
| 723 case IrOpcode::kNumberBitwiseAnd: { |
| 724 VisitInt32Binop(node); |
| 725 if (lower()) NodeProperties::ChangeOp(node, Int32Op(node)); |
| 726 break; |
| 727 } |
721 case IrOpcode::kNumberShiftLeft: { | 728 case IrOpcode::kNumberShiftLeft: { |
722 VisitBinop(node, kMachInt32, kMachUint32, kMachInt32); | 729 VisitBinop(node, kMachInt32, kMachUint32, kMachInt32); |
723 if (lower()) lowering->DoShift(node, lowering->machine()->Word32Shl()); | 730 if (lower()) lowering->DoShift(node, lowering->machine()->Word32Shl()); |
724 break; | 731 break; |
725 } | 732 } |
726 case IrOpcode::kNumberShiftRight: { | 733 case IrOpcode::kNumberShiftRight: { |
727 VisitBinop(node, kMachInt32, kMachUint32, kMachInt32); | 734 VisitBinop(node, kMachInt32, kMachUint32, kMachInt32); |
728 if (lower()) lowering->DoShift(node, lowering->machine()->Word32Sar()); | 735 if (lower()) lowering->DoShift(node, lowering->machine()->Word32Sar()); |
729 break; | 736 break; |
730 } | 737 } |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1684 ReplaceEffectUses(node, comparison); | 1691 ReplaceEffectUses(node, comparison); |
1685 node->ReplaceInput(0, comparison); | 1692 node->ReplaceInput(0, comparison); |
1686 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 1693 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
1687 node->TrimInputCount(2); | 1694 node->TrimInputCount(2); |
1688 NodeProperties::ChangeOp(node, machine()->IntLessThanOrEqual()); | 1695 NodeProperties::ChangeOp(node, machine()->IntLessThanOrEqual()); |
1689 } | 1696 } |
1690 | 1697 |
1691 } // namespace compiler | 1698 } // namespace compiler |
1692 } // namespace internal | 1699 } // namespace internal |
1693 } // namespace v8 | 1700 } // namespace v8 |
OLD | NEW |