Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index b43dc51d1beef4eb21d7ff789d1c22ebc8b40271..dd237715c92bea23ee5c65d99c34c8e3b8961b61 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -5790,8 +5790,8 @@ HInstruction* HOptimizedGraphBuilder::BuildLoadNamedField( |
PropertyAccessInfo* info, |
HValue* checked_object) { |
// See if this is a load for an immutable property |
- if (checked_object->ActualValue()->IsConstant() && info->IsCacheable() && |
- info->IsReadOnly() && !info->IsConfigurable()) { |
+ if (checked_object->ActualValue()->IsConstant() && info->IsReadOnly() && |
+ !info->IsConfigurable()) { |
Handle<Object> object( |
HConstant::cast(checked_object->ActualValue())->handle(isolate())); |
@@ -5970,7 +5970,7 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LookupDescriptor() { |
bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadResult(Handle<Map> map) { |
- if (!IsLoad() && IsProperty() && (IsReadOnly() || !IsCacheable())) { |
+ if (!IsLoad() && IsProperty() && IsReadOnly()) { |
return false; |
} |
@@ -6074,10 +6074,7 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::CanAccessMonomorphic() { |
return IsLoad(); |
} |
if (!LookupDescriptor()) return false; |
- if (IsFound()) { |
- if (IsLoad()) return true; |
- return !IsReadOnly() && IsCacheable(); |
- } |
+ if (IsFound()) return IsLoad() || !IsReadOnly(); |
if (!LookupInPrototypes()) return false; |
if (IsLoad()) return true; |