Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: src/crankshaft/hydrogen-types.cc

Issue 1655833002: Remove the template magic from types.(h|cc), remove types-inl.h. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Undo whitespace change Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/typing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698