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

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: Code review. 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
« no previous file with comments | « 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..fd49513026d5f43c49b5f16cdc2da1ea24ec62c8 100644
--- a/src/type-feedback-vector.cc
+++ b/src/type-feedback-vector.cc
@@ -224,6 +224,40 @@ void TypeFeedbackVector::ClearICSlotsImpl(SharedFunctionInfo* shared,
// static
+void TypeFeedbackVector::ClearAllKeyedStoreICs(Isolate* isolate) {
+ DCHECK(FLAG_vector_stores);
+ SharedFunctionInfo::Iterator iterator(isolate);
+ SharedFunctionInfo* shared;
+ while ((shared = iterator.Next())) {
+ TypeFeedbackVector* vector = shared->feedback_vector();
+ vector->ClearKeyedStoreICs(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());
}
« no previous file with comments | « src/type-feedback-vector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698