Use HType::Tagged when allocating elements.
authordslomov@chromium.org <dslomov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 24 Mar 2014 14:41:01 +0000 (14:41 +0000)
committerdslomov@chromium.org <dslomov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 24 Mar 2014 14:41:01 +0000 (14:41 +0000)
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/201573010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/hydrogen.cc

index 8705f782a2ed1814b7b4cd8f990eee4eda4c4ce5..45d4b56ef42467df08f8e1e2490af0c6f1babd7c 100644 (file)
@@ -2309,7 +2309,7 @@ HValue* HGraphBuilder::BuildAllocateElements(ElementsKind kind,
   PretenureFlag pretenure_flag = !FLAG_allocation_site_pretenuring ?
       isolate()->heap()->GetPretenureMode() : NOT_TENURED;
 
-  return Add<HAllocate>(total_size, HType::JSArray(), pretenure_flag,
+  return Add<HAllocate>(total_size, HType::Tagged(), pretenure_flag,
       instance_type);
 }
 
@@ -2615,11 +2615,11 @@ HValue* HGraphBuilder::BuildCloneShallowArray(HValue* boilerplate,
     HValue* object_elements;
     if (IsFastDoubleElementsKind(kind)) {
       HValue* elems_size = Add<HConstant>(FixedDoubleArray::SizeFor(length));
-      object_elements = Add<HAllocate>(elems_size, HType::JSArray(),
+      object_elements = Add<HAllocate>(elems_size, HType::Tagged(),
           NOT_TENURED, FIXED_DOUBLE_ARRAY_TYPE);
     } else {
       HValue* elems_size = Add<HConstant>(FixedArray::SizeFor(length));
-      object_elements = Add<HAllocate>(elems_size, HType::JSArray(),
+      object_elements = Add<HAllocate>(elems_size, HType::Tagged(),
           NOT_TENURED, FIXED_ARRAY_TYPE);
     }
     Add<HStoreNamedField>(object, HObjectAccess::ForElementsPointer(),
@@ -8533,7 +8533,7 @@ void HOptimizedGraphBuilder::GenerateTypedArrayInitialize(
     HValue* elements =
         Add<HAllocate>(
             Add<HConstant>(ExternalArray::kAlignedSize),
-            HType::JSArray(),
+            HType::Tagged(),
             NOT_TENURED,
             external_array_map->instance_type());
 
@@ -9788,10 +9788,10 @@ HInstruction* HOptimizedGraphBuilder::BuildFastLiteral(
         Add<HStoreNamedField>(object, HObjectAccess::ForElementsPointer(),
                               empty_fixed_array);
       }
-      object_elements = Add<HAllocate>(object_elements_size, HType::JSObject(),
+      object_elements = Add<HAllocate>(object_elements_size, HType::Tagged(),
           pretenure_flag, FIXED_DOUBLE_ARRAY_TYPE, site_context->current());
     } else {
-      object_elements = Add<HAllocate>(object_elements_size, HType::JSObject(),
+      object_elements = Add<HAllocate>(object_elements_size, HType::Tagged(),
           pretenure_flag, FIXED_ARRAY_TYPE, site_context->current());
     }
   }