| Index: src/heap/mark-compact.cc
|
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
|
| index 90fc13616c65f750b974ce58ff821742603486f8..2c98b7adc4e47a01103168d819a1117dc99c0ccb 100644
|
| --- a/src/heap/mark-compact.cc
|
| +++ b/src/heap/mark-compact.cc
|
| @@ -898,6 +898,11 @@ void CodeFlusher::ProcessJSFunctionCandidates() {
|
| shared->ShortPrint();
|
| PrintF(" - age: %d]\n", code->GetAge());
|
| }
|
| + // Always flush the optimized code map if requested by flag.
|
| + if (FLAG_cache_optimized_code && FLAG_flush_optimized_code_cache &&
|
| + !shared->optimized_code_map()->IsSmi()) {
|
| + shared->ClearOptimizedCodeMap();
|
| + }
|
| shared->set_code(lazy_compile);
|
| candidate->set_code(lazy_compile);
|
| } else {
|
| @@ -941,6 +946,11 @@ void CodeFlusher::ProcessSharedFunctionInfoCandidates() {
|
| candidate->ShortPrint();
|
| PrintF(" - age: %d]\n", code->GetAge());
|
| }
|
| + // Always flush the optimized code map if requested by flag.
|
| + if (FLAG_cache_optimized_code && FLAG_flush_optimized_code_cache &&
|
| + !candidate->optimized_code_map()->IsSmi()) {
|
| + candidate->ClearOptimizedCodeMap();
|
| + }
|
| candidate->set_code(lazy_compile);
|
| }
|
|
|
|
|