Index: src/objects-visiting-inl.h |
diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h |
index db84664d425e05cafd2a1b8ca9828bf4ddd4024d..4f1498844dc496c4aed94996b0d509cccba1602e 100644 |
--- a/src/objects-visiting-inl.h |
+++ b/src/objects-visiting-inl.h |
@@ -427,6 +427,9 @@ void StaticMarkingVisitor<StaticVisitor>::VisitCode( |
Map* map, HeapObject* object) { |
Heap* heap = map->GetHeap(); |
Code* code = Code::cast(object); |
+ if (FLAG_cleanup_code_caches_at_gc) { |
+ code->ClearTypeFeedbackInfo(heap); |
+ } |
if (FLAG_age_code && !Serializer::enabled()) { |
code->MakeOlder(heap->mark_compact_collector()->marking_parity()); |
} |
@@ -442,9 +445,6 @@ void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( |
if (shared->ic_age() != heap->global_ic_age()) { |
shared->ResetForNewContext(heap->global_ic_age()); |
} |
- if (FLAG_cleanup_code_caches_at_gc) { |
- shared->ClearTypeFeedbackInfo(heap); |
- } |
if (FLAG_cache_optimized_code && |
FLAG_flush_optimized_code_cache && |
!shared->optimized_code_map()->IsSmi()) { |