Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 30932093be4763c09ebbe8b1498192ab8cbd5cee..efe60a2b073d65c20db537ccf8ae329e53af155b 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -480,6 +480,20 @@ intptr_t Heap::SizeOfObjects() { |
} |
+void Heap::ClearAllICsByKind(Code::Kind kind) { |
+ 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::RepairFreeListsAfterBoot() { |
PagedSpaces spaces(this); |
for (PagedSpace* space = spaces.next(); |