diff --git a/src/hydrogen.cc b/src/hydrogen.cc index a5647679ac..a7b8766eee 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -8651,18 +8651,17 @@ void HOptimizedGraphBuilder::VisitTypedArrayInitialize( HObjectAccess::ForJSTypedArrayLength(), length); + Handle external_array_map( + isolate()->heap()->MapForExternalArrayType(array_type)); + HValue* elements = Add( Add(ExternalArray::kAlignedSize), HType::JSArray(), NOT_TENURED, - static_cast(FIRST_EXTERNAL_ARRAY_TYPE + array_type)); + external_array_map->instance_type()); - Handle external_array_map( - isolate()->heap()->MapForExternalArrayType(array_type)); - Add(elements, - HObjectAccess::ForMap(), - Add(external_array_map)); + AddStoreMapConstant(elements, external_array_map); HValue* backing_store = Add( buffer, static_cast(NULL),