Index: src/crankshaft/hydrogen.cc |
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc |
index 87995c02f6539eceb9eb9268d259550f88ddb26b..81b3fe4c079f5f268cfaace37f21773e82754af1 100644 |
--- a/src/crankshaft/hydrogen.cc |
+++ b/src/crankshaft/hydrogen.cc |
@@ -5405,6 +5405,7 @@ void HOptimizedGraphBuilder::VisitVariableProxy(VariableProxy* expr) { |
} |
LookupIterator it(global, variable->name(), LookupIterator::OWN); |
+ it.TryLookupCacheProperty(); |
if (CanInlineGlobalPropertyAccess(variable, &it, LOAD)) { |
InlineGlobalPropertyLoad(&it, expr->id()); |
return; |
@@ -6216,6 +6217,17 @@ HValue* HOptimizedGraphBuilder::BuildMonomorphicAccess( |
} |
if (info->IsAccessorConstant()) { |
+ MaybeHandle<Name> maybe_name = |
+ FunctionTemplateInfo::TryGetCachePropertyName(isolate(), |
+ info->accessor()); |
+ if (!maybe_name.is_null()) { |
+ Handle<Name> name = maybe_name.ToHandleChecked(); |
+ PropertyAccessInfo cache_info(this, LOAD, info->map(), name); |
+ // Load new target. |
+ if (cache_info.CanAccessMonomorphic()) |
+ return BuildLoadNamedField(&cache_info, checked_object); |
+ } |
+ |
Push(checked_object); |
int argument_count = 1; |
if (!info->IsLoad()) { |