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

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

Issue 1074133002: Remove Type::Array bit and replace with Type::GlobalObject (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | src/types.h » ('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/hydrogen-types.h" 5 #include "src/hydrogen-types.h"
6 6
7 #include "src/ostreams.h" 7 #include "src/ostreams.h"
8 #include "src/types-inl.h" 8 #include "src/types-inl.h"
9 9
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 // static 14 // static
15 template <class T> 15 template <class T>
16 HType HType::FromType(typename T::TypeHandle type) { 16 HType HType::FromType(typename T::TypeHandle type) {
17 if (T::Any()->Is(type)) return HType::Any(); 17 if (T::Any()->Is(type)) return HType::Any();
18 if (!type->IsInhabited()) return HType::None(); 18 if (!type->IsInhabited()) return HType::None();
19 if (type->Is(T::SignedSmall())) return HType::Smi(); 19 if (type->Is(T::SignedSmall())) return HType::Smi();
20 if (type->Is(T::Number())) return HType::TaggedNumber(); 20 if (type->Is(T::Number())) return HType::TaggedNumber();
21 if (type->Is(T::Null())) return HType::Null(); 21 if (type->Is(T::Null())) return HType::Null();
22 if (type->Is(T::String())) return HType::String(); 22 if (type->Is(T::String())) return HType::String();
23 if (type->Is(T::Boolean())) return HType::Boolean(); 23 if (type->Is(T::Boolean())) return HType::Boolean();
24 if (type->Is(T::Undefined())) return HType::Undefined(); 24 if (type->Is(T::Undefined())) return HType::Undefined();
25 if (type->Is(T::Array())) return HType::JSArray();
26 if (type->Is(T::Object())) return HType::JSObject(); 25 if (type->Is(T::Object())) return HType::JSObject();
27 if (type->Is(T::Receiver())) return HType::JSReceiver(); 26 if (type->Is(T::Receiver())) return HType::JSReceiver();
28 return HType::Tagged(); 27 return HType::Tagged();
29 } 28 }
30 29
31 30
32 // static 31 // static
33 template 32 template
34 HType HType::FromType<Type>(Type* type); 33 HType HType::FromType<Type>(Type* type);
35 34
(...skipping 29 matching lines...) Expand all
65 case HType::k##Name: \ 64 case HType::k##Name: \
66 return os << #Name; 65 return os << #Name;
67 HTYPE_LIST(DEFINE_CASE) 66 HTYPE_LIST(DEFINE_CASE)
68 #undef DEFINE_CASE 67 #undef DEFINE_CASE
69 } 68 }
70 UNREACHABLE(); 69 UNREACHABLE();
71 return os; 70 return os;
72 } 71 }
73 72
74 } } // namespace v8::internal 73 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698