Chromium Code Reviews| Index: src/mark-compact.cc |
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
| index b570db9e348d48726ae6cfd2f2aee3e1c2d53c31..6e79694ac503fa8e3056ad925f438c12f9f8bd83 100644 |
| --- a/src/mark-compact.cc |
| +++ b/src/mark-compact.cc |
| @@ -82,6 +82,8 @@ void MarkCompactCollector::CollectGarbage() { |
| SweepLargeObjectSpace(); |
| if (IsCompacting()) { |
| + ASSERT(!FLAG_new_gc); |
| + |
| GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_COMPACT); |
| EncodeForwardingAddresses(); |
| @@ -107,6 +109,12 @@ void MarkCompactCollector::CollectGarbage() { |
| void MarkCompactCollector::Prepare(GCTracer* tracer) { |
| + if (FLAG_new_gc) { |
| + FLAG_flush_code = false; |
| + FLAG_always_compact = false; |
| + FLAG_never_compact = true; |
| + } |
| + |
| // Rather than passing the tracer around we stash it in a static member |
| // variable. |
| tracer_ = tracer; |
| @@ -2347,7 +2355,7 @@ void MarkCompactCollector::SweepSpaces() { |
| int live_maps = static_cast<int>(live_maps_size / Map::kSize); |
| ASSERT(live_map_objects_size_ == live_maps_size); |
| - if (Heap::map_space()->NeedsCompaction(live_maps)) { |
| + if (!FLAG_new_gc && Heap::map_space()->NeedsCompaction(live_maps)) { |
|
Erik Corry
2010/12/13 19:58:28
Shouldnt this be !FLAG_never_compact. Looks a lit
|
| MapCompact map_compact(live_maps); |
| map_compact.CompactMaps(); |