| 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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 case IrOpcode::kNumberClz32: | 656 case IrOpcode::kNumberClz32: |
| 657 return machine()->Word32Clz(); | 657 return machine()->Word32Clz(); |
| 658 case IrOpcode::kNumberImul: | 658 case IrOpcode::kNumberImul: |
| 659 return machine()->Int32Mul(); | 659 return machine()->Int32Mul(); |
| 660 default: | 660 default: |
| 661 UNREACHABLE(); | 661 UNREACHABLE(); |
| 662 return nullptr; | 662 return nullptr; |
| 663 } | 663 } |
| 664 } | 664 } |
| 665 | 665 |
| 666 const Operator* RepresentationChanger::Uint32OverflowOperatorFor( |
| 667 IrOpcode::Value opcode) { |
| 668 switch (opcode) { |
| 669 case IrOpcode::kSpeculativeNumberDivide: |
| 670 return simplified()->CheckedUint32Div(); |
| 671 case IrOpcode::kSpeculativeNumberModulus: |
| 672 return simplified()->CheckedUint32Mod(); |
| 673 default: |
| 674 UNREACHABLE(); |
| 675 return nullptr; |
| 676 } |
| 677 } |
| 666 | 678 |
| 667 const Operator* RepresentationChanger::Float64OperatorFor( | 679 const Operator* RepresentationChanger::Float64OperatorFor( |
| 668 IrOpcode::Value opcode) { | 680 IrOpcode::Value opcode) { |
| 669 switch (opcode) { | 681 switch (opcode) { |
| 670 case IrOpcode::kSpeculativeNumberAdd: | 682 case IrOpcode::kSpeculativeNumberAdd: |
| 671 case IrOpcode::kNumberAdd: | 683 case IrOpcode::kNumberAdd: |
| 672 return machine()->Float64Add(); | 684 return machine()->Float64Add(); |
| 673 case IrOpcode::kSpeculativeNumberSubtract: | 685 case IrOpcode::kSpeculativeNumberSubtract: |
| 674 case IrOpcode::kNumberSubtract: | 686 case IrOpcode::kNumberSubtract: |
| 675 return machine()->Float64Sub(); | 687 return machine()->Float64Sub(); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 } | 802 } |
| 791 | 803 |
| 792 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { | 804 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { |
| 793 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), | 805 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), |
| 794 node); | 806 node); |
| 795 } | 807 } |
| 796 | 808 |
| 797 } // namespace compiler | 809 } // namespace compiler |
| 798 } // namespace internal | 810 } // namespace internal |
| 799 } // namespace v8 | 811 } // namespace v8 |
| OLD | NEW |