Index: src/crankshaft/hydrogen-types.cc |
diff --git a/src/crankshaft/hydrogen-types.cc b/src/crankshaft/hydrogen-types.cc |
index 9c5e34194ee385e708e7f58bc958f2fee7718114..4c640de31c4605ce19569020fc23463bfe14f9c3 100644 |
--- a/src/crankshaft/hydrogen-types.cc |
+++ b/src/crankshaft/hydrogen-types.cc |
@@ -12,31 +12,25 @@ namespace v8 { |
namespace internal { |
// static |
-template <class T> |
-HType HType::FromType(typename T::TypeHandle type) { |
- if (T::Any()->Is(type)) return HType::Any(); |
+HType HType::FromType(Type* type) { |
+ if (Type::Any()->Is(type)) return HType::Any(); |
if (!type->IsInhabited()) return HType::None(); |
- if (type->Is(T::SignedSmall())) return HType::Smi(); |
- if (type->Is(T::Number())) return HType::TaggedNumber(); |
- if (type->Is(T::Null())) return HType::Null(); |
- if (type->Is(T::String())) return HType::String(); |
- if (type->Is(T::Boolean())) return HType::Boolean(); |
- if (type->Is(T::Undefined())) return HType::Undefined(); |
- if (type->Is(T::Object())) return HType::JSObject(); |
- if (type->Is(T::Receiver())) return HType::JSReceiver(); |
+ if (type->Is(Type::SignedSmall())) return HType::Smi(); |
+ if (type->Is(Type::Number())) return HType::TaggedNumber(); |
+ if (type->Is(Type::Null())) return HType::Null(); |
+ if (type->Is(Type::String())) return HType::String(); |
+ if (type->Is(Type::Boolean())) return HType::Boolean(); |
+ if (type->Is(Type::Undefined())) return HType::Undefined(); |
+ if (type->Is(Type::Object())) return HType::JSObject(); |
+ if (type->Is(Type::Receiver())) return HType::JSReceiver(); |
return HType::Tagged(); |
} |
// static |
-template |
-HType HType::FromType<Type>(Type* type); |
- |
- |
-// static |
-template |
-HType HType::FromType<HeapType>(Handle<HeapType> type); |
- |
+HType HType::FromFieldType(Handle<FieldType> type, Zone* temp_zone) { |
Benedikt Meurer
2016/01/26 14:22:47
Can we have a TODO here to remember to clean this
Jarin
2016/01/26 14:30:41
As discussed offline, it is not clear what can be
|
+ return FromType(type->Convert(temp_zone)); |
+} |
// static |
HType HType::FromValue(Handle<Object> value) { |