Index: src/compiler/access-info.cc |
diff --git a/src/compiler/access-info.cc b/src/compiler/access-info.cc |
index 866b06086a2042df0f6a811e25c7fa8a1f36ce62..59af2674c858d7fc64c22fb1a4fe99c9af781959 100644 |
--- a/src/compiler/access-info.cc |
+++ b/src/compiler/access-info.cc |
@@ -52,6 +52,8 @@ std::ostream& operator<<(std::ostream& os, AccessMode access_mode) { |
return os << "Load"; |
case AccessMode::kStore: |
return os << "Store"; |
+ case AccessMode::kStoreInLiteral: |
+ return os << "StoreInLiteral"; |
} |
UNREACHABLE(); |
return os; |
@@ -282,7 +284,8 @@ bool AccessInfoFactory::ComputePropertyAccessInfo( |
int const number = descriptors->SearchWithCache(isolate(), *name, *map); |
if (number != DescriptorArray::kNotFound) { |
PropertyDetails const details = descriptors->GetDetails(number); |
- if (access_mode == AccessMode::kStore) { |
+ if (access_mode == AccessMode::kStore || |
+ access_mode == AccessMode::kStoreInLiteral) { |
// Don't bother optimizing stores to read-only properties. |
if (details.IsReadOnly()) { |
return false; |
@@ -382,6 +385,11 @@ bool AccessInfoFactory::ComputePropertyAccessInfo( |
return false; |
} |
+ // Don't search on the prototype when storing in literals |
+ if (access_mode == AccessMode::kStoreInLiteral) { |
+ return false; |
+ } |
+ |
// Don't lookup private symbols on the prototype chain. |
if (name->IsPrivate()) return false; |