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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 } else if (output_rep == MachineRepresentation::kTagged || | 669 } else if (output_rep == MachineRepresentation::kTagged || |
670 output_rep == MachineRepresentation::kTaggedPointer) { | 670 output_rep == MachineRepresentation::kTaggedPointer) { |
671 if (output_type->Is(Type::BooleanOrNullOrUndefined())) { | 671 if (output_type->Is(Type::BooleanOrNullOrUndefined())) { |
672 // true is the only trueish Oddball. | 672 // true is the only trueish Oddball. |
673 op = simplified()->ChangeTaggedToBit(); | 673 op = simplified()->ChangeTaggedToBit(); |
674 } else { | 674 } else { |
675 op = simplified()->TruncateTaggedToBit(); | 675 op = simplified()->TruncateTaggedToBit(); |
676 } | 676 } |
677 } else if (output_rep == MachineRepresentation::kTaggedSigned) { | 677 } else if (output_rep == MachineRepresentation::kTaggedSigned) { |
678 node = jsgraph()->graph()->NewNode(machine()->WordEqual(), node, | 678 node = jsgraph()->graph()->NewNode(machine()->WordEqual(), node, |
679 jsgraph()->ZeroConstant()); | 679 jsgraph()->IntPtrConstant(0)); |
680 return jsgraph()->graph()->NewNode(machine()->Word32Equal(), node, | 680 return jsgraph()->graph()->NewNode(machine()->Word32Equal(), node, |
681 jsgraph()->Int32Constant(0)); | 681 jsgraph()->Int32Constant(0)); |
682 } else if (IsWord(output_rep)) { | 682 } else if (IsWord(output_rep)) { |
683 node = jsgraph()->graph()->NewNode(machine()->Word32Equal(), node, | 683 node = jsgraph()->graph()->NewNode(machine()->Word32Equal(), node, |
684 jsgraph()->Int32Constant(0)); | 684 jsgraph()->Int32Constant(0)); |
685 return jsgraph()->graph()->NewNode(machine()->Word32Equal(), node, | 685 return jsgraph()->graph()->NewNode(machine()->Word32Equal(), node, |
686 jsgraph()->Int32Constant(0)); | 686 jsgraph()->Int32Constant(0)); |
687 } else if (output_rep == MachineRepresentation::kFloat32) { | 687 } else if (output_rep == MachineRepresentation::kFloat32) { |
688 node = jsgraph()->graph()->NewNode(machine()->Float32Abs(), node); | 688 node = jsgraph()->graph()->NewNode(machine()->Float32Abs(), node); |
689 return jsgraph()->graph()->NewNode(machine()->Float32LessThan(), | 689 return jsgraph()->graph()->NewNode(machine()->Float32LessThan(), |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 } | 959 } |
960 | 960 |
961 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { | 961 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { |
962 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), | 962 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), |
963 node); | 963 node); |
964 } | 964 } |
965 | 965 |
966 } // namespace compiler | 966 } // namespace compiler |
967 } // namespace internal | 967 } // namespace internal |
968 } // namespace v8 | 968 } // namespace v8 |
OLD | NEW |