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

Unified Diff: src/ic/ic.cc

Issue 2369933005: Speedup global_proxy.* attributes/accessors (specialize GlobalProxy access). (Closed)
Patch Set: Merge cached accessors + global proxy specialization Created 4 years, 3 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
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index da38d581f0d8183b5dad6385b9d8942b5c4bd16c..8be212237b418313dfd6a13832b9bc201e94ee4b 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -1241,6 +1241,16 @@ Handle<Code> LoadIC::CompileHandler(LookupIterator* lookup,
DCHECK(!GetSharedFunctionInfo()->HasDebugInfo());
Handle<Object> getter(Handle<AccessorPair>::cast(accessors)->getter(),
isolate());
+
+ MaybeHandle<Name> maybe_name =
+ FunctionTemplateInfo::TryGetCachePropertyName(isolate(), getter);
+ if (!maybe_name.is_null()) {
+ Handle<Name> name = maybe_name.ToHandleChecked();
+ LookupIterator cache_it(lookup->GetReceiver(), name, holder);
+ CHECK_EQ(LookupIterator::DATA, cache_it.state());
+ return CompileHandler(&cache_it, unused, cache_holder);
+ }
+
CallOptimization call_optimization(getter);
NamedLoadHandlerCompiler compiler(isolate(), map, holder, cache_holder);
if (call_optimization.is_simple_api_call()) {
@@ -1288,7 +1298,6 @@ Handle<Code> LoadIC::CompileHandler(LookupIterator* lookup,
// -------------- Fields --------------
if (lookup->property_details().type() == DATA) {
FieldIndex field = lookup->GetFieldIndex();
- DCHECK(!receiver_is_holder);
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadField);
NamedLoadHandlerCompiler compiler(isolate(), map, holder, cache_holder);
return compiler.CompileLoadField(lookup->name(), field);
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698