Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Unified Diff: src/hydrogen.cc

Issue 1069883002: WIP SharedArrayBuffer implementation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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(

Powered by Google App Engine
This is Rietveld 408576698