Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index c1cb28f7b7e7f3f8111b5bebafb348f1efc1a885..3b77c73c0d0357e4e6d660ba03a3735326f284ad 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -701,11 +701,11 @@ HConstant* HGraph::GetConstant##Name() { \ |
} |
-DEFINE_GET_CONSTANT(Undefined, undefined, undefined, HType::Tagged(), false) |
+DEFINE_GET_CONSTANT(Undefined, undefined, undefined, HType::Undefined(), false) |
DEFINE_GET_CONSTANT(True, true, boolean, HType::Boolean(), true) |
DEFINE_GET_CONSTANT(False, false, boolean, HType::Boolean(), false) |
-DEFINE_GET_CONSTANT(Hole, the_hole, the_hole, HType::Tagged(), false) |
-DEFINE_GET_CONSTANT(Null, null, null, HType::Tagged(), false) |
+DEFINE_GET_CONSTANT(Hole, the_hole, the_hole, HType::None(), false) |
+DEFINE_GET_CONSTANT(Null, null, null, HType::Null(), false) |
#undef DEFINE_GET_CONSTANT |
@@ -1553,7 +1553,7 @@ HValue* HGraphBuilder::BuildRegExpConstructResult(HValue* length, |
// Determine the elements FixedArray. |
HValue* elements = Add<HInnerAllocatedObject>( |
- result, Add<HConstant>(JSRegExpResult::kSize)); |
+ result, Add<HConstant>(JSRegExpResult::kSize), HType::HeapObject()); |
// Initialize the JSRegExpResult header. |
HValue* global_object = Add<HLoadNamedField>( |
@@ -2293,7 +2293,7 @@ HValue* HGraphBuilder::BuildAllocateElements(ElementsKind kind, |
HValue* total_size = AddUncasted<HAdd>(mul, header_size); |
total_size->ClearFlag(HValue::kCanOverflow); |
- return Add<HAllocate>(total_size, HType::NonPrimitive(), NOT_TENURED, |
+ return Add<HAllocate>(total_size, HType::HeapObject(), NOT_TENURED, |
instance_type); |
} |
@@ -2352,7 +2352,7 @@ HInnerAllocatedObject* HGraphBuilder::BuildJSArrayHeader(HValue* array, |
} |
HInnerAllocatedObject* elements = Add<HInnerAllocatedObject>( |
- array, Add<HConstant>(elements_location)); |
+ array, Add<HConstant>(elements_location), HType::HeapObject()); |
Add<HStoreNamedField>(array, HObjectAccess::ForElementsPointer(), elements); |
return elements; |
} |
@@ -2641,7 +2641,7 @@ HValue* HGraphBuilder::BuildCloneShallowArrayCommon( |
if (extra_size != NULL) { |
HValue* elements = Add<HInnerAllocatedObject>(object, |
- Add<HConstant>(array_size)); |
+ Add<HConstant>(array_size), HType::HeapObject()); |
if (return_elements != NULL) *return_elements = elements; |
} |
@@ -2799,7 +2799,7 @@ void HGraphBuilder::BuildCreateAllocationMemento( |
HValue* allocation_site) { |
ASSERT(allocation_site != NULL); |
HInnerAllocatedObject* allocation_memento = Add<HInnerAllocatedObject>( |
- previous_object, previous_object_size); |
+ previous_object, previous_object_size, HType::HeapObject()); |
AddStoreMapConstant( |
allocation_memento, isolate()->factory()->allocation_memento_map()); |
Add<HStoreNamedField>( |
@@ -5485,7 +5485,7 @@ HInstruction* HOptimizedGraphBuilder::BuildStoreNamedField( |
// TODO(hpayer): Allocation site pretenuring support. |
HInstruction* heap_number = Add<HAllocate>(heap_number_size, |
- HType::Tagged(), |
+ HType::HeapObject(), |
NOT_TENURED, |
HEAP_NUMBER_TYPE); |
AddStoreMapConstant(heap_number, isolate()->factory()->heap_number_map()); |
@@ -5673,20 +5673,8 @@ void HOptimizedGraphBuilder::PropertyAccessInfo::LoadFieldMaps( |
ASSERT_EQ(num_field_maps, field_maps_.length()); |
// Determine field HType from field HeapType. |
- if (field_type->Is(HeapType::Number())) { |
- field_type_ = HType::HeapNumber(); |
- } else if (field_type->Is(HeapType::String())) { |
- field_type_ = HType::String(); |
- } else if (field_type->Is(HeapType::Boolean())) { |
- field_type_ = HType::Boolean(); |
- } else if (field_type->Is(HeapType::Array())) { |
- field_type_ = HType::JSArray(); |
- } else if (field_type->Is(HeapType::Object())) { |
- field_type_ = HType::JSObject(); |
- } else if (field_type->Is(HeapType::Null()) || |
- field_type->Is(HeapType::Undefined())) { |
- field_type_ = HType::NonPrimitive(); |
- } |
+ field_type_ = HType::FromType<HeapType>(field_type); |
+ ASSERT(field_type_.IsHeapObject()); |
// Add dependency on the map that introduced the field. |
Map::AddDependentCompilationInfo( |
@@ -8796,7 +8784,7 @@ HValue* HOptimizedGraphBuilder::BuildAllocateExternalElements( |
HValue* elements = |
Add<HAllocate>( |
Add<HConstant>(ExternalArray::kAlignedSize), |
- HType::NonPrimitive(), |
+ HType::HeapObject(), |
NOT_TENURED, |
external_array_map->instance_type()); |
@@ -8853,7 +8841,7 @@ HValue* HOptimizedGraphBuilder::BuildAllocateFixedTypedArray( |
Handle<Map> fixed_typed_array_map( |
isolate()->heap()->MapForFixedTypedArray(array_type)); |
HValue* elements = |
- Add<HAllocate>(total_size, HType::NonPrimitive(), |
+ Add<HAllocate>(total_size, HType::HeapObject(), |
NOT_TENURED, fixed_typed_array_map->instance_type()); |
AddStoreMapConstant(elements, fixed_typed_array_map); |
@@ -10286,7 +10274,7 @@ HInstruction* HOptimizedGraphBuilder::BuildFastLiteral( |
InstanceType instance_type = boilerplate_object->HasFastDoubleElements() |
? FIXED_DOUBLE_ARRAY_TYPE : FIXED_ARRAY_TYPE; |
object_elements = Add<HAllocate>( |
- object_elements_size, HType::NonPrimitive(), |
+ object_elements_size, HType::HeapObject(), |
pretenure_flag, instance_type, site_context->current()); |
} |
BuildInitElementsInObjectHeader(boilerplate_object, object, object_elements); |