| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 case TruncationKind::kAny: | 90 case TruncationKind::kAny: |
| 91 return rep2 == TruncationKind::kAny; | 91 return rep2 == TruncationKind::kAny; |
| 92 } | 92 } |
| 93 UNREACHABLE(); | 93 UNREACHABLE(); |
| 94 return false; | 94 return false; |
| 95 } | 95 } |
| 96 | 96 |
| 97 | 97 |
| 98 namespace { | 98 namespace { |
| 99 | 99 |
| 100 // TODO(titzer): should Word64 also be implicitly convertable to others? | |
| 101 bool IsWord(MachineRepresentation rep) { | 100 bool IsWord(MachineRepresentation rep) { |
| 102 return rep == MachineRepresentation::kWord8 || | 101 return rep == MachineRepresentation::kWord8 || |
| 103 rep == MachineRepresentation::kWord16 || | 102 rep == MachineRepresentation::kWord16 || |
| 104 rep == MachineRepresentation::kWord32; | 103 rep == MachineRepresentation::kWord32; |
| 105 } | 104 } |
| 106 | 105 |
| 107 } // namespace | 106 } // namespace |
| 108 | 107 |
| 109 | 108 |
| 110 // Changes representation from {output_rep} to {use_rep}. The {truncation} | 109 // Changes representation from {output_rep} to {use_rep}. The {truncation} |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 | 527 |
| 529 | 528 |
| 530 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { | 529 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { |
| 531 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), | 530 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), |
| 532 node); | 531 node); |
| 533 } | 532 } |
| 534 | 533 |
| 535 } // namespace compiler | 534 } // namespace compiler |
| 536 } // namespace internal | 535 } // namespace internal |
| 537 } // namespace v8 | 536 } // namespace v8 |
| OLD | NEW |