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

Unified Diff: src/type-info.cc

Issue 2123983004: [ic] Split megamorphic stub cache in two caches (for loads and for stores). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@flags-fix
Patch Set: Rebasing Created 4 years, 5 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
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index 61af125c47c22f7fa9ead72f69b4be9a4cab67d6..058ad4cf8f11480f07776c72e9489393e32b68ca 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -281,7 +281,8 @@ void TypeFeedbackOracle::PropertyReceiverTypes(FeedbackVectorSlot slot,
if (!slot.IsInvalid()) {
LoadICNexus nexus(feedback_vector_, slot);
Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC);
- CollectReceiverTypes(&nexus, name, flags, receiver_types);
+ CollectReceiverTypes(isolate()->load_stub_cache(), &nexus, name, flags,
+ receiver_types);
}
}
@@ -307,7 +308,8 @@ void TypeFeedbackOracle::AssignmentReceiverTypes(FeedbackVectorSlot slot,
SmallMapList* receiver_types) {
receiver_types->Clear();
Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC);
- CollectReceiverTypes(slot, name, flags, receiver_types);
+ CollectReceiverTypes(isolate()->store_stub_cache(), slot, name, flags,
+ receiver_types);
}
@@ -326,24 +328,25 @@ void TypeFeedbackOracle::CountReceiverTypes(FeedbackVectorSlot slot,
if (!slot.IsInvalid()) CollectReceiverTypes(slot, receiver_types);
}
-
-void TypeFeedbackOracle::CollectReceiverTypes(FeedbackVectorSlot slot,
+void TypeFeedbackOracle::CollectReceiverTypes(StubCache* stub_cache,
+ FeedbackVectorSlot slot,
Handle<Name> name,
Code::Flags flags,
SmallMapList* types) {
StoreICNexus nexus(feedback_vector_, slot);
- CollectReceiverTypes(&nexus, name, flags, types);
+ CollectReceiverTypes(stub_cache, &nexus, name, flags, types);
}
-void TypeFeedbackOracle::CollectReceiverTypes(FeedbackNexus* nexus,
+void TypeFeedbackOracle::CollectReceiverTypes(StubCache* stub_cache,
+ FeedbackNexus* nexus,
Handle<Name> name,
Code::Flags flags,
SmallMapList* types) {
if (FLAG_collect_megamorphic_maps_from_stub_cache &&
nexus->ic_state() == MEGAMORPHIC) {
types->Reserve(4, zone());
- isolate()->stub_cache()->CollectMatchingMaps(
- types, name, flags, native_context_, zone());
+ stub_cache->CollectMatchingMaps(types, name, flags, native_context_,
+ zone());
} else {
CollectReceiverTypes(nexus, types);
}
« src/ic/x64/stub-cache-x64.cc ('K') | « src/type-info.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698