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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 default: | 597 default: |
598 UNREACHABLE(); | 598 UNREACHABLE(); |
599 return nullptr; | 599 return nullptr; |
600 } | 600 } |
601 } | 601 } |
602 | 602 |
603 const Operator* RepresentationChanger::Int32OverflowOperatorFor( | 603 const Operator* RepresentationChanger::Int32OverflowOperatorFor( |
604 IrOpcode::Value opcode) { | 604 IrOpcode::Value opcode) { |
605 switch (opcode) { | 605 switch (opcode) { |
606 case IrOpcode::kSpeculativeNumberAdd: // Fall through. | 606 case IrOpcode::kSpeculativeNumberAdd: // Fall through. |
607 return machine()->Int32AddWithOverflow(); | 607 return simplified()->CheckedInt32Add(); |
608 case IrOpcode::kSpeculativeNumberSubtract: // Fall through. | 608 case IrOpcode::kSpeculativeNumberSubtract: // Fall through. |
609 return machine()->Int32SubWithOverflow(); | 609 return simplified()->CheckedInt32Sub(); |
610 default: | 610 default: |
611 UNREACHABLE(); | 611 UNREACHABLE(); |
612 return nullptr; | 612 return nullptr; |
613 } | 613 } |
614 } | 614 } |
615 | 615 |
616 const Operator* RepresentationChanger::Uint32OperatorFor( | 616 const Operator* RepresentationChanger::Uint32OperatorFor( |
617 IrOpcode::Value opcode) { | 617 IrOpcode::Value opcode) { |
618 switch (opcode) { | 618 switch (opcode) { |
619 case IrOpcode::kNumberAdd: | 619 case IrOpcode::kNumberAdd: |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 } | 757 } |
758 | 758 |
759 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { | 759 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { |
760 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), | 760 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), |
761 node); | 761 node); |
762 } | 762 } |
763 | 763 |
764 } // namespace compiler | 764 } // namespace compiler |
765 } // namespace internal | 765 } // namespace internal |
766 } // namespace v8 | 766 } // namespace v8 |
OLD | NEW |