Chromium Code Reviews| Index: src/hydrogen.cc |
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
| index b43dc51d1beef4eb21d7ff789d1c22ebc8b40271..79bd49598e45e75ca5636976618be94d06505ead 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; |
| } |
| @@ -6076,7 +6076,7 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::CanAccessMonomorphic() { |
| if (!LookupDescriptor()) return false; |
| if (IsFound()) { |
| if (IsLoad()) return true; |
| - return !IsReadOnly() && IsCacheable(); |
| + return !IsReadOnly(); |
|
Yang
2014/08/26 15:30:17
you could rewrite that as
IsLoad() || !IsReadOnly(
|
| } |
| if (!LookupInPrototypes()) return false; |
| if (IsLoad()) return true; |