OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 5836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5847 } | 5847 } |
5848 | 5848 |
5849 if (type->Is(Type::UntaggedPointer())) { | 5849 if (type->Is(Type::UntaggedPointer())) { |
5850 return Representation::External(); | 5850 return Representation::External(); |
5851 } | 5851 } |
5852 | 5852 |
5853 DCHECK(!type->Is(Type::Untagged())); | 5853 DCHECK(!type->Is(Type::Untagged())); |
5854 return Representation::Tagged(); | 5854 return Representation::Tagged(); |
5855 } | 5855 } |
5856 | 5856 |
| 5857 Representation RepresentationFromMachineType(MachineType type) { |
| 5858 if (type == MachineType::Int32()) { |
| 5859 return Representation::Integer32(); |
| 5860 } |
| 5861 |
| 5862 if (type == MachineType::TaggedSigned()) { |
| 5863 return Representation::Smi(); |
| 5864 } |
| 5865 |
| 5866 if (type == MachineType::Pointer()) { |
| 5867 return Representation::External(); |
| 5868 } |
| 5869 |
| 5870 return Representation::Tagged(); |
| 5871 } |
| 5872 |
5857 } // namespace internal | 5873 } // namespace internal |
5858 } // namespace v8 | 5874 } // namespace v8 |
OLD | NEW |