Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index fdc7edc59745c7ce3c99b4c74f790c76d3ac5837..07e490ed022d92b7c831cb46d8424dab53d98550 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -245,7 +245,10 @@ bool MarkCompactCollector::StartCompaction() { |
CollectEvacuationCandidates(heap()->old_pointer_space()); |
CollectEvacuationCandidates(heap()->old_data_space()); |
- CollectEvacuationCandidates(heap()->code_space()); |
+ |
+ if (FLAG_compact_code_space) { |
+ CollectEvacuationCandidates(heap()->code_space()); |
+ } |
heap()->old_pointer_space()->EvictEvacuationCandidatesFromFreeLists(); |
heap()->old_data_space()->EvictEvacuationCandidatesFromFreeLists(); |