Index: src/heap.h |
diff --git a/src/heap.h b/src/heap.h |
index 672b490ff479ea8e09e0293aef56694d9a3c34c2..2bd037f15b1e32d7b4e4c182b43638a2cc434fb4 100644 |
--- a/src/heap.h |
+++ b/src/heap.h |
@@ -1480,6 +1480,13 @@ class Heap { |
void ClearNormalizedMapCaches(); |
+ // Clears the cache of ICs related to this map. |
+ void ClearCacheOnMap(Map* map) { |
+ if (FLAG_cleanup_code_caches_at_gc) { |
+ map->ClearCodeCache(this); |
+ } |
+ } |
+ |
GCTracer* tracer() { return tracer_; } |
// Returns the size of objects residing in non new spaces. |
@@ -1585,6 +1592,16 @@ class Heap { |
// For post mortem debugging. |
void RememberUnmappedPage(Address page, bool compacted); |
+ // Global inline caching age: it is incremented on some GCs after context |
+ // disposal. We use it to flush inline caches. |
+ int global_ic_age() { |
+ return global_ic_age_; |
+ } |
+ |
+ void AgeInlineCaches() { |
+ ++global_ic_age_; |
+ } |
+ |
private: |
Heap(); |
@@ -1612,6 +1629,8 @@ class Heap { |
// For keeping track of context disposals. |
int contexts_disposed_; |
+ int global_ic_age_; |
+ |
int scan_on_scavenge_pages_; |
#if defined(V8_TARGET_ARCH_X64) |