| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 SweepLargeObjectSpace(); | 82 SweepLargeObjectSpace(); |
| 83 | 83 |
| 84 if (IsCompacting()) { | 84 if (IsCompacting()) { |
| 85 GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_COMPACT); | 85 GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_COMPACT); |
| 86 EncodeForwardingAddresses(); | 86 EncodeForwardingAddresses(); |
| 87 | 87 |
| 88 heap_->MarkMapPointersAsEncoded(true); | 88 heap_->MarkMapPointersAsEncoded(true); |
| 89 UpdatePointers(); | 89 UpdatePointers(); |
| 90 heap_->MarkMapPointersAsEncoded(false); | 90 heap_->MarkMapPointersAsEncoded(false); |
| 91 PcToCodeCache::FlushPcToCodeCache(); | 91 heap_->isolate()->pc_to_code_cache()->Flush(); |
| 92 | 92 |
| 93 RelocateObjects(); | 93 RelocateObjects(); |
| 94 } else { | 94 } else { |
| 95 SweepSpaces(); | 95 SweepSpaces(); |
| 96 PcToCodeCache::FlushPcToCodeCache(); | 96 heap_->isolate()->pc_to_code_cache()->Flush(); |
| 97 } | 97 } |
| 98 | 98 |
| 99 Finish(); | 99 Finish(); |
| 100 | 100 |
| 101 // Save the count of marked objects remaining after the collection and | 101 // Save the count of marked objects remaining after the collection and |
| 102 // null out the GC tracer. | 102 // null out the GC tracer. |
| 103 previous_marked_count_ = tracer_->marked_count(); | 103 previous_marked_count_ = tracer_->marked_count(); |
| 104 ASSERT(previous_marked_count_ == 0); | 104 ASSERT(previous_marked_count_ == 0); |
| 105 tracer_ = NULL; | 105 tracer_ = NULL; |
| 106 } | 106 } |
| (...skipping 2590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2697 } | 2697 } |
| 2698 | 2698 |
| 2699 | 2699 |
| 2700 void MarkCompactCollector::Initialize() { | 2700 void MarkCompactCollector::Initialize() { |
| 2701 StaticPointersToNewGenUpdatingVisitor::Initialize(); | 2701 StaticPointersToNewGenUpdatingVisitor::Initialize(); |
| 2702 StaticMarkingVisitor::Initialize(); | 2702 StaticMarkingVisitor::Initialize(); |
| 2703 } | 2703 } |
| 2704 | 2704 |
| 2705 | 2705 |
| 2706 } } // namespace v8::internal | 2706 } } // namespace v8::internal |
| OLD | NEW |