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

Unified Diff: src/type-feedback-vector.cc

Issue 1314433004: Vector ICs: Stop iterating the heap to clear keyed store ics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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
« src/heap/heap.cc ('K') | « src/type-feedback-vector.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-feedback-vector.cc
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc
index 6aa4712682733538345657ecf2bc190201a99336..25b3565708c3df98e9da26efbac037f08bec76b5 100644
--- a/src/type-feedback-vector.cc
+++ b/src/type-feedback-vector.cc
@@ -223,6 +223,28 @@ void TypeFeedbackVector::ClearICSlotsImpl(SharedFunctionInfo* shared,
}
+void TypeFeedbackVector::ClearKeyedStoreICs(SharedFunctionInfo* shared) {
+ Heap* heap = GetIsolate()->heap();
+
+ int slots = ICSlots();
+ Code* host = shared->code();
+ Object* uninitialized_sentinel =
+ TypeFeedbackVector::RawUninitializedSentinel(heap);
+ for (int i = 0; i < slots; i++) {
+ FeedbackVectorICSlot slot(i);
+ Object* obj = Get(slot);
+ if (obj != uninitialized_sentinel) {
+ Code::Kind kind = GetKind(slot);
+ if (kind == Code::KEYED_STORE_IC) {
+ DCHECK(FLAG_vector_stores);
+ KeyedStoreICNexus nexus(this, slot);
+ nexus.Clear(host);
+ }
+ }
+ }
+}
+
+
// static
Handle<TypeFeedbackVector> TypeFeedbackVector::DummyVector(Isolate* isolate) {
return Handle<TypeFeedbackVector>::cast(isolate->factory()->dummy_vector());
« src/heap/heap.cc ('K') | « src/type-feedback-vector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698