| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 134     if (IsWord(use_info.representation()) && IsWord(output_rep)) { | 134     if (IsWord(use_info.representation()) && IsWord(output_rep)) { | 
| 135       // Both are words less than or equal to 32-bits. | 135       // Both are words less than or equal to 32-bits. | 
| 136       // Since loads of integers from memory implicitly sign or zero extend the | 136       // Since loads of integers from memory implicitly sign or zero extend the | 
| 137       // value to the full machine word size and stores implicitly truncate, | 137       // value to the full machine word size and stores implicitly truncate, | 
| 138       // no representation change is necessary. | 138       // no representation change is necessary. | 
| 139       return node; | 139       return node; | 
| 140     } | 140     } | 
| 141   } | 141   } | 
| 142 | 142 | 
| 143   switch (use_info.representation()) { | 143   switch (use_info.representation()) { | 
|  | 144     case MachineRepresentation::kTaggedSigned: | 
|  | 145     case MachineRepresentation::kTaggedPointer: | 
| 144     case MachineRepresentation::kTagged: | 146     case MachineRepresentation::kTagged: | 
| 145       DCHECK(use_info.type_check() == TypeCheckKind::kNone); | 147       DCHECK(use_info.type_check() == TypeCheckKind::kNone); | 
| 146       return GetTaggedRepresentationFor(node, output_rep, output_type); | 148       return GetTaggedRepresentationFor(node, output_rep, output_type); | 
| 147     case MachineRepresentation::kFloat32: | 149     case MachineRepresentation::kFloat32: | 
| 148       DCHECK(use_info.type_check() == TypeCheckKind::kNone); | 150       DCHECK(use_info.type_check() == TypeCheckKind::kNone); | 
| 149       return GetFloat32RepresentationFor(node, output_rep, output_type, | 151       return GetFloat32RepresentationFor(node, output_rep, output_type, | 
| 150                                          use_info.truncation()); | 152                                          use_info.truncation()); | 
| 151     case MachineRepresentation::kFloat64: | 153     case MachineRepresentation::kFloat64: | 
| 152       return GetFloat64RepresentationFor(node, output_rep, output_type, | 154       return GetFloat64RepresentationFor(node, output_rep, output_type, | 
| 153                                          use_node, use_info); | 155                                          use_node, use_info); | 
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 819 } | 821 } | 
| 820 | 822 | 
| 821 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { | 823 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { | 
| 822   return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), | 824   return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), | 
| 823                                      node); | 825                                      node); | 
| 824 } | 826 } | 
| 825 | 827 | 
| 826 }  // namespace compiler | 828 }  // namespace compiler | 
| 827 }  // namespace internal | 829 }  // namespace internal | 
| 828 }  // namespace v8 | 830 }  // namespace v8 | 
| OLD | NEW | 
|---|