Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index d6cbc1444ad52eac67ab0f98ecd35f3a8e3943ae..fc3a91b948017bf4d6dd837cb0766cb09db38e81 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -6072,7 +6072,8 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LookupInPrototypes() { |
bool HOptimizedGraphBuilder::PropertyAccessInfo::IsIntegerIndexedExotic() { |
InstanceType instance_type = map_->instance_type(); |
- return instance_type == JS_TYPED_ARRAY_TYPE && |
+ return (instance_type == JS_TYPED_ARRAY_TYPE || |
+ instance_type == JS_SHARED_TYPED_ARRAY_TYPE) && |
IsSpecialIndex(isolate()->unicode_cache(), *name_); |
} |
@@ -9721,7 +9722,8 @@ void HOptimizedGraphBuilder::GenerateTypedArrayInitialize( |
static const int kBufferArg = 2; |
static const int kByteOffsetArg = 3; |
static const int kByteLengthArg = 4; |
- static const int kArgsLength = 5; |
+ static const int kIsSharedArg = 5; |
+ static const int kArgsLength = 6; |
DCHECK(arguments->length() == kArgsLength); |
@@ -9770,6 +9772,9 @@ void HOptimizedGraphBuilder::GenerateTypedArrayInitialize( |
CHECK_ALIVE(VisitForValue(arguments->at(kByteLengthArg))); |
HValue* byte_length = Pop(); |
+ CHECK_ALIVE(VisitForValue(arguments->at(kIsSharedArg))); |
+ HValue* is_shared = Pop(); |
+ |
NoObservableSideEffectsScope scope(this); |
IfBuilder byte_offset_smi(this); |
@@ -9804,6 +9809,9 @@ void HOptimizedGraphBuilder::GenerateTypedArrayInitialize( |
HObjectAccess::ForJSTypedArrayLength(), |
length); |
+ Add<HStoreNamedField>(obj, HObjectAccess::ForJSTypedArrayIsShared(), |
+ is_shared); |
+ |
HValue* elements; |
if (buffer != NULL) { |
elements = BuildAllocateExternalElements( |