| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/representation-change.h" | 5 #include "src/compiler/representation-change.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 return simplified()->CheckedInt32Mod(); | 744 return simplified()->CheckedInt32Mod(); |
| 745 default: | 745 default: |
| 746 UNREACHABLE(); | 746 UNREACHABLE(); |
| 747 return nullptr; | 747 return nullptr; |
| 748 } | 748 } |
| 749 } | 749 } |
| 750 | 750 |
| 751 const Operator* RepresentationChanger::Uint32OperatorFor( | 751 const Operator* RepresentationChanger::Uint32OperatorFor( |
| 752 IrOpcode::Value opcode) { | 752 IrOpcode::Value opcode) { |
| 753 switch (opcode) { | 753 switch (opcode) { |
| 754 case IrOpcode::kSpeculativeNumberAdd: | |
| 755 case IrOpcode::kNumberAdd: | 754 case IrOpcode::kNumberAdd: |
| 756 return machine()->Int32Add(); | 755 return machine()->Int32Add(); |
| 757 case IrOpcode::kSpeculativeNumberSubtract: | |
| 758 case IrOpcode::kNumberSubtract: | 756 case IrOpcode::kNumberSubtract: |
| 759 return machine()->Int32Sub(); | 757 return machine()->Int32Sub(); |
| 760 case IrOpcode::kSpeculativeNumberMultiply: | 758 case IrOpcode::kSpeculativeNumberMultiply: |
| 761 case IrOpcode::kNumberMultiply: | 759 case IrOpcode::kNumberMultiply: |
| 762 return machine()->Int32Mul(); | 760 return machine()->Int32Mul(); |
| 763 case IrOpcode::kSpeculativeNumberDivide: | 761 case IrOpcode::kSpeculativeNumberDivide: |
| 764 case IrOpcode::kNumberDivide: | 762 case IrOpcode::kNumberDivide: |
| 765 return machine()->Uint32Div(); | 763 return machine()->Uint32Div(); |
| 766 case IrOpcode::kSpeculativeNumberModulus: | 764 case IrOpcode::kSpeculativeNumberModulus: |
| 767 case IrOpcode::kNumberModulus: | 765 case IrOpcode::kNumberModulus: |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 } | 932 } |
| 935 | 933 |
| 936 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { | 934 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { |
| 937 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), | 935 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), |
| 938 node); | 936 node); |
| 939 } | 937 } |
| 940 | 938 |
| 941 } // namespace compiler | 939 } // namespace compiler |
| 942 } // namespace internal | 940 } // namespace internal |
| 943 } // namespace v8 | 941 } // namespace v8 |
| OLD | NEW |