| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 MarkLiveObjects(); | 162 MarkLiveObjects(); |
| 163 } else { | 163 } else { |
| 164 { | 164 { |
| 165 GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_MARK); | 165 GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_MARK); |
| 166 IncrementalMarking::Finalize(); | 166 IncrementalMarking::Finalize(); |
| 167 ASSERT(IncrementalMarking::state() == IncrementalMarking::STOPPED); | 167 ASSERT(IncrementalMarking::state() == IncrementalMarking::STOPPED); |
| 168 } | 168 } |
| 169 MarkLiveObjects(); | 169 MarkLiveObjects(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 if (FLAG_collect_maps) ClearNonLiveTransitions(); |
| 173 |
| 172 #ifdef DEBUG | 174 #ifdef DEBUG |
| 173 VerifyMarking(); | 175 VerifyMarking(); |
| 174 #endif | 176 #endif |
| 175 if (FLAG_collect_maps) ClearNonLiveTransitions(); | |
| 176 | 177 |
| 177 SweepSpaces(); | 178 SweepSpaces(); |
| 178 | 179 |
| 179 PcToCodeCache::FlushPcToCodeCache(); | 180 PcToCodeCache::FlushPcToCodeCache(); |
| 180 | 181 |
| 181 Finish(); | 182 Finish(); |
| 182 | 183 |
| 183 // Check that swept all marked objects and | 184 // Check that swept all marked objects and |
| 184 // null out the GC tracer. | 185 // null out the GC tracer. |
| 185 // TODO(gc) does not work with conservative sweeping. | 186 // TODO(gc) does not work with conservative sweeping. |
| (...skipping 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2252 } | 2253 } |
| 2253 | 2254 |
| 2254 | 2255 |
| 2255 void MarkCompactCollector::Initialize() { | 2256 void MarkCompactCollector::Initialize() { |
| 2256 StaticPointersToNewGenUpdatingVisitor::Initialize(); | 2257 StaticPointersToNewGenUpdatingVisitor::Initialize(); |
| 2257 StaticMarkingVisitor::Initialize(); | 2258 StaticMarkingVisitor::Initialize(); |
| 2258 } | 2259 } |
| 2259 | 2260 |
| 2260 | 2261 |
| 2261 } } // namespace v8::internal | 2262 } } // namespace v8::internal |
| OLD | NEW |