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

Unified Diff: src/heap.cc

Issue 3134027: Reapplying r5147 (caching maps for slow case objects).... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/heap.h ('k') | src/ic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 5318)
+++ src/heap.cc (working copy)
@@ -571,6 +571,22 @@
}
+class ClearThreadNormalizedMapCachesVisitor: public ThreadVisitor {
+ virtual void VisitThread(ThreadLocalTop* top) {
+ Context* context = top->context_;
+ if (context == NULL) return;
+ context->global()->global_context()->normalized_map_cache()->Clear();
+ }
+};
+
+
+void Heap::ClearNormalizedMapCaches() {
+ if (Bootstrapper::IsActive()) return;
+ ClearThreadNormalizedMapCachesVisitor visitor;
+ ThreadManager::IterateArchivedThreads(&visitor);
+}
+
+
#ifdef DEBUG
enum PageWatermarkValidity {
@@ -755,6 +771,8 @@
CompletelyClearInstanceofCache();
if (is_compacting) FlushNumberStringCache();
+
+ ClearNormalizedMapCaches();
}
« no previous file with comments | « src/heap.h ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698