| 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 #ifndef V8_MARK_COMPACT_H_ | 5 #ifndef V8_MARK_COMPACT_H_ |
| 6 #define V8_MARK_COMPACT_H_ | 6 #define V8_MARK_COMPACT_H_ |
| 7 | 7 |
| 8 #include "compiler-intrinsics.h" | 8 #include "compiler-intrinsics.h" |
| 9 #include "spaces.h" | 9 #include "spaces.h" |
| 10 | 10 |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 class SweeperTask; | 697 class SweeperTask; |
| 698 | 698 |
| 699 explicit MarkCompactCollector(Heap* heap); | 699 explicit MarkCompactCollector(Heap* heap); |
| 700 ~MarkCompactCollector(); | 700 ~MarkCompactCollector(); |
| 701 | 701 |
| 702 bool MarkInvalidatedCode(); | 702 bool MarkInvalidatedCode(); |
| 703 bool WillBeDeoptimized(Code* code); | 703 bool WillBeDeoptimized(Code* code); |
| 704 void RemoveDeadInvalidatedCode(); | 704 void RemoveDeadInvalidatedCode(); |
| 705 void ProcessInvalidatedCode(ObjectVisitor* visitor); | 705 void ProcessInvalidatedCode(ObjectVisitor* visitor); |
| 706 | 706 |
| 707 void UnlinkEvacuationCandidates(); | |
| 708 void ReleaseEvacuationCandidates(); | |
| 709 | |
| 710 void StartSweeperThreads(); | 707 void StartSweeperThreads(); |
| 711 | 708 |
| 712 #ifdef DEBUG | 709 #ifdef DEBUG |
| 713 enum CollectorState { | 710 enum CollectorState { |
| 714 IDLE, | 711 IDLE, |
| 715 PREPARE_GC, | 712 PREPARE_GC, |
| 716 MARK_LIVE_OBJECTS, | 713 MARK_LIVE_OBJECTS, |
| 717 SWEEP_SPACES, | 714 SWEEP_SPACES, |
| 718 ENCODE_FORWARDING_ADDRESSES, | 715 ENCODE_FORWARDING_ADDRESSES, |
| 719 UPDATE_POINTERS, | 716 UPDATE_POINTERS, |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 NewSpacePage* p); | 885 NewSpacePage* p); |
| 889 | 886 |
| 890 void EvacuateNewSpace(); | 887 void EvacuateNewSpace(); |
| 891 | 888 |
| 892 void EvacuateLiveObjectsFromPage(Page* p); | 889 void EvacuateLiveObjectsFromPage(Page* p); |
| 893 | 890 |
| 894 void EvacuatePages(); | 891 void EvacuatePages(); |
| 895 | 892 |
| 896 void EvacuateNewSpaceAndCandidates(); | 893 void EvacuateNewSpaceAndCandidates(); |
| 897 | 894 |
| 895 void ReleaseEvacuationCandidates(); |
| 896 |
| 897 // Moves the pages of the evacuation_candidates_ list to the end of their |
| 898 // corresponding space pages list. |
| 899 void MoveEvacuationCandidatesToEndOfPagesList(); |
| 900 |
| 898 void SweepSpace(PagedSpace* space, SweeperType sweeper); | 901 void SweepSpace(PagedSpace* space, SweeperType sweeper); |
| 899 | 902 |
| 900 // Finalizes the parallel sweeping phase. Marks all the pages that were | 903 // Finalizes the parallel sweeping phase. Marks all the pages that were |
| 901 // swept in parallel. | 904 // swept in parallel. |
| 902 void ParallelSweepSpacesComplete(); | 905 void ParallelSweepSpacesComplete(); |
| 903 | 906 |
| 904 void ParallelSweepSpaceComplete(PagedSpace* space); | 907 void ParallelSweepSpaceComplete(PagedSpace* space); |
| 905 | 908 |
| 906 #ifdef DEBUG | 909 #ifdef DEBUG |
| 907 friend class MarkObjectVisitor; | 910 friend class MarkObjectVisitor; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 private: | 988 private: |
| 986 MarkCompactCollector* collector_; | 989 MarkCompactCollector* collector_; |
| 987 }; | 990 }; |
| 988 | 991 |
| 989 | 992 |
| 990 const char* AllocationSpaceName(AllocationSpace space); | 993 const char* AllocationSpaceName(AllocationSpace space); |
| 991 | 994 |
| 992 } } // namespace v8::internal | 995 } } // namespace v8::internal |
| 993 | 996 |
| 994 #endif // V8_MARK_COMPACT_H_ | 997 #endif // V8_MARK_COMPACT_H_ |
| OLD | NEW |