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

Unified Diff: src/heap/heap.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.h ('K') | « src/heap/heap.h ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index ec3837cfbec09c4ce8f52b2e9a7530d8203863c4..531c170c140007f3a4869a3114461ac7771a7074 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -477,16 +477,26 @@ const char* Heap::GetSpaceName(int idx) {
}
-void Heap::ClearAllICsByKind(Code::Kind kind) {
- // TODO(mvstanton): Do not iterate the heap.
- HeapObjectIterator it(code_space());
-
- for (Object* object = it.Next(); object != NULL; object = it.Next()) {
- Code* code = Code::cast(object);
- Code::Kind current_kind = code->kind();
- if (current_kind == Code::FUNCTION ||
- current_kind == Code::OPTIMIZED_FUNCTION) {
- code->ClearInlineCaches(kind);
+void Heap::ClearAllKeyedStoreICs() {
Hannes Payer (out of office) 2015/08/26 21:46:33 I do not like that heap owns this method. It has n
mvstanton 2015/08/27 08:17:33 Okay, I've taken the new code and moved it. The ca
+ if (FLAG_vector_stores) {
+ SharedFunctionInfo::Iterator iterator(isolate_);
+ SharedFunctionInfo* shared;
+ while ((shared = iterator.Next())) {
+ TypeFeedbackVector* vector = shared->feedback_vector();
+ vector->ClearKeyedStoreICs(shared);
+ }
+ } else {
+ // TODO(mvstanton): Remove this branch when FLAG_vector_stores is turned on
+ // permanently.
+ HeapObjectIterator it(code_space());
+
+ for (Object* object = it.Next(); object != NULL; object = it.Next()) {
+ Code* code = Code::cast(object);
+ Code::Kind current_kind = code->kind();
+ if (current_kind == Code::FUNCTION ||
+ current_kind == Code::OPTIMIZED_FUNCTION) {
+ code->ClearInlineCaches(Code::KEYED_STORE_IC);
+ }
}
}
}
« src/heap/heap.h ('K') | « src/heap/heap.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698