OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/crankshaft/hydrogen-types.h" | 5 #include "src/crankshaft/hydrogen-types.h" |
6 | 6 |
| 7 #include "src/handles-inl.h" |
7 #include "src/ostreams.h" | 8 #include "src/ostreams.h" |
8 #include "src/types-inl.h" | |
9 | |
10 | 9 |
11 namespace v8 { | 10 namespace v8 { |
12 namespace internal { | 11 namespace internal { |
13 | 12 |
14 // static | 13 // static |
15 HType HType::FromType(Type* type) { | 14 HType HType::FromType(Type* type) { |
16 if (Type::Any()->Is(type)) return HType::Any(); | 15 if (Type::Any()->Is(type)) return HType::Any(); |
17 if (!type->IsInhabited()) return HType::None(); | 16 if (!type->IsInhabited()) return HType::None(); |
18 if (type->Is(Type::SignedSmall())) return HType::Smi(); | 17 if (type->Is(Type::SignedSmall())) return HType::Smi(); |
19 if (type->Is(Type::Number())) return HType::TaggedNumber(); | 18 if (type->Is(Type::Number())) return HType::TaggedNumber(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 return os << #Name; | 58 return os << #Name; |
60 HTYPE_LIST(DEFINE_CASE) | 59 HTYPE_LIST(DEFINE_CASE) |
61 #undef DEFINE_CASE | 60 #undef DEFINE_CASE |
62 } | 61 } |
63 UNREACHABLE(); | 62 UNREACHABLE(); |
64 return os; | 63 return os; |
65 } | 64 } |
66 | 65 |
67 } // namespace internal | 66 } // namespace internal |
68 } // namespace v8 | 67 } // namespace v8 |
OLD | NEW |