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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 return machine()->Int32LessThanOrEqual(); | 607 return machine()->Int32LessThanOrEqual(); |
608 default: | 608 default: |
609 UNREACHABLE(); | 609 UNREACHABLE(); |
610 return nullptr; | 610 return nullptr; |
611 } | 611 } |
612 } | 612 } |
613 | 613 |
614 const Operator* RepresentationChanger::Int32OverflowOperatorFor( | 614 const Operator* RepresentationChanger::Int32OverflowOperatorFor( |
615 IrOpcode::Value opcode) { | 615 IrOpcode::Value opcode) { |
616 switch (opcode) { | 616 switch (opcode) { |
617 case IrOpcode::kSpeculativeNumberAdd: // Fall through. | 617 case IrOpcode::kSpeculativeNumberAdd: |
618 return simplified()->CheckedInt32Add(); | 618 return simplified()->CheckedInt32Add(); |
619 case IrOpcode::kSpeculativeNumberSubtract: // Fall through. | 619 case IrOpcode::kSpeculativeNumberSubtract: |
620 return simplified()->CheckedInt32Sub(); | 620 return simplified()->CheckedInt32Sub(); |
| 621 case IrOpcode::kSpeculativeNumberDivide: |
| 622 return simplified()->CheckedInt32Div(); |
| 623 case IrOpcode::kSpeculativeNumberModulus: |
| 624 return simplified()->CheckedInt32Mod(); |
621 default: | 625 default: |
622 UNREACHABLE(); | 626 UNREACHABLE(); |
623 return nullptr; | 627 return nullptr; |
624 } | 628 } |
625 } | 629 } |
626 | 630 |
627 const Operator* RepresentationChanger::Uint32OperatorFor( | 631 const Operator* RepresentationChanger::Uint32OperatorFor( |
628 IrOpcode::Value opcode) { | 632 IrOpcode::Value opcode) { |
629 switch (opcode) { | 633 switch (opcode) { |
630 case IrOpcode::kNumberAdd: | 634 case IrOpcode::kNumberAdd: |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 } | 790 } |
787 | 791 |
788 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { | 792 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { |
789 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), | 793 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), |
790 node); | 794 node); |
791 } | 795 } |
792 | 796 |
793 } // namespace compiler | 797 } // namespace compiler |
794 } // namespace internal | 798 } // namespace internal |
795 } // namespace v8 | 799 } // namespace v8 |
OLD | NEW |