| Index: src/objects-visiting-inl.h
|
| diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h
|
| index 4a9dab5caaa6f67803c1529fc6f45d5dfe9949aa..925b2562f292558687716cc6be8c0b618d1f7f04 100644
|
| --- a/src/objects-visiting-inl.h
|
| +++ b/src/objects-visiting-inl.h
|
| @@ -299,6 +299,13 @@ void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo(
|
| if (shared->ic_age() != heap->global_ic_age()) {
|
| shared->ResetForNewContext(heap->global_ic_age());
|
| }
|
| + if (FLAG_cache_optimized_code) {
|
| + // Flush optimized code map on major GC.
|
| + // TODO(mstarzinger): We may experiment with rebuilding it or with
|
| + // retaining entries which should survive as we iterate through
|
| + // optimized functions anyway.
|
| + shared->ClearOptimizedCodeMap();
|
| + }
|
| MarkCompactCollector* collector = heap->mark_compact_collector();
|
| if (collector->is_code_flushing_enabled()) {
|
| if (IsFlushable(heap, shared)) {
|
|
|