| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/heap/mark-compact.h" | 5 #include "src/heap/mark-compact.h" |
| 6 | 6 |
| 7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/base/sys-info.h" | 9 #include "src/base/sys-info.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 3677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3688 { | 3688 { |
| 3689 GCTracer::Scope gc_scope(heap()->tracer(), | 3689 GCTracer::Scope gc_scope(heap()->tracer(), |
| 3690 GCTracer::Scope::MC_EVACUATE_UPDATE_POINTERS_WEAK); | 3690 GCTracer::Scope::MC_EVACUATE_UPDATE_POINTERS_WEAK); |
| 3691 heap_->string_table()->Iterate(&updating_visitor); | 3691 heap_->string_table()->Iterate(&updating_visitor); |
| 3692 | 3692 |
| 3693 // Update pointers from external string table. | 3693 // Update pointers from external string table. |
| 3694 heap_->UpdateReferencesInExternalStringTable( | 3694 heap_->UpdateReferencesInExternalStringTable( |
| 3695 &UpdateReferenceInExternalStringTableEntry); | 3695 &UpdateReferenceInExternalStringTableEntry); |
| 3696 | 3696 |
| 3697 EvacuationWeakObjectRetainer evacuation_object_retainer; | 3697 EvacuationWeakObjectRetainer evacuation_object_retainer; |
| 3698 heap()->ProcessAllWeakReferences(&evacuation_object_retainer); | 3698 heap()->ProcessWeakListRoots(&evacuation_object_retainer); |
| 3699 } | 3699 } |
| 3700 } | 3700 } |
| 3701 | 3701 |
| 3702 | 3702 |
| 3703 void MarkCompactCollector::ReleaseEvacuationCandidates() { | 3703 void MarkCompactCollector::ReleaseEvacuationCandidates() { |
| 3704 for (Page* p : evacuation_candidates_) { | 3704 for (Page* p : evacuation_candidates_) { |
| 3705 if (!p->IsEvacuationCandidate()) continue; | 3705 if (!p->IsEvacuationCandidate()) continue; |
| 3706 PagedSpace* space = static_cast<PagedSpace*>(p->owner()); | 3706 PagedSpace* space = static_cast<PagedSpace*>(p->owner()); |
| 3707 space->Free(p->area_start(), p->area_size()); | 3707 space->Free(p->area_start(), p->area_size()); |
| 3708 p->ResetLiveBytes(); | 3708 p->ResetLiveBytes(); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3907 MarkBit mark_bit = Marking::MarkBitFrom(host); | 3907 MarkBit mark_bit = Marking::MarkBitFrom(host); |
| 3908 if (Marking::IsBlack(mark_bit)) { | 3908 if (Marking::IsBlack(mark_bit)) { |
| 3909 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host); | 3909 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host); |
| 3910 RecordRelocSlot(host, &rinfo, target); | 3910 RecordRelocSlot(host, &rinfo, target); |
| 3911 } | 3911 } |
| 3912 } | 3912 } |
| 3913 } | 3913 } |
| 3914 | 3914 |
| 3915 } // namespace internal | 3915 } // namespace internal |
| 3916 } // namespace v8 | 3916 } // namespace v8 |
| OLD | NEW |