OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
720 class SweeperTask; | 720 class SweeperTask; |
721 | 721 |
722 explicit MarkCompactCollector(Heap* heap); | 722 explicit MarkCompactCollector(Heap* heap); |
723 ~MarkCompactCollector(); | 723 ~MarkCompactCollector(); |
724 | 724 |
725 bool MarkInvalidatedCode(); | 725 bool MarkInvalidatedCode(); |
726 bool WillBeDeoptimized(Code* code); | 726 bool WillBeDeoptimized(Code* code); |
727 void RemoveDeadInvalidatedCode(); | 727 void RemoveDeadInvalidatedCode(); |
728 void ProcessInvalidatedCode(ObjectVisitor* visitor); | 728 void ProcessInvalidatedCode(ObjectVisitor* visitor); |
729 | 729 |
730 void UnlinkEvacuationCandidates(); | 730 void UnlinkEvacuationCandidates(); |
Michael Starzinger
2014/04/29 10:23:57
nit: The unlink method is gone, let's remove the d
Hannes Payer (out of office)
2014/04/29 10:59:27
Done.
| |
731 void ReleaseEvacuationCandidates(); | 731 void ReleaseEvacuationCandidates(); |
Michael Starzinger
2014/04/29 10:23:57
nit: The release method could be moved to near the
Hannes Payer (out of office)
2014/04/29 10:59:27
Done.
| |
732 | 732 |
733 void StartSweeperThreads(); | 733 void StartSweeperThreads(); |
734 | 734 |
735 #ifdef DEBUG | 735 #ifdef DEBUG |
736 enum CollectorState { | 736 enum CollectorState { |
737 IDLE, | 737 IDLE, |
738 PREPARE_GC, | 738 PREPARE_GC, |
739 MARK_LIVE_OBJECTS, | 739 MARK_LIVE_OBJECTS, |
740 SWEEP_SPACES, | 740 SWEEP_SPACES, |
741 ENCODE_FORWARDING_ADDRESSES, | 741 ENCODE_FORWARDING_ADDRESSES, |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
911 NewSpacePage* p); | 911 NewSpacePage* p); |
912 | 912 |
913 void EvacuateNewSpace(); | 913 void EvacuateNewSpace(); |
914 | 914 |
915 void EvacuateLiveObjectsFromPage(Page* p); | 915 void EvacuateLiveObjectsFromPage(Page* p); |
916 | 916 |
917 void EvacuatePages(); | 917 void EvacuatePages(); |
918 | 918 |
919 void EvacuateNewSpaceAndCandidates(); | 919 void EvacuateNewSpaceAndCandidates(); |
920 | 920 |
921 void MoveEvacuationCandidatesToEndOfPagesList(); | |
922 | |
921 void SweepSpace(PagedSpace* space, SweeperType sweeper); | 923 void SweepSpace(PagedSpace* space, SweeperType sweeper); |
922 | 924 |
923 // Finalizes the parallel sweeping phase. Marks all the pages that were | 925 // Finalizes the parallel sweeping phase. Marks all the pages that were |
924 // swept in parallel. | 926 // swept in parallel. |
925 void ParallelSweepSpacesComplete(); | 927 void ParallelSweepSpacesComplete(); |
926 | 928 |
927 void ParallelSweepSpaceComplete(PagedSpace* space); | 929 void ParallelSweepSpaceComplete(PagedSpace* space); |
928 | 930 |
929 #ifdef DEBUG | 931 #ifdef DEBUG |
930 friend class MarkObjectVisitor; | 932 friend class MarkObjectVisitor; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1008 private: | 1010 private: |
1009 MarkCompactCollector* collector_; | 1011 MarkCompactCollector* collector_; |
1010 }; | 1012 }; |
1011 | 1013 |
1012 | 1014 |
1013 const char* AllocationSpaceName(AllocationSpace space); | 1015 const char* AllocationSpaceName(AllocationSpace space); |
1014 | 1016 |
1015 } } // namespace v8::internal | 1017 } } // namespace v8::internal |
1016 | 1018 |
1017 #endif // V8_MARK_COMPACT_H_ | 1019 #endif // V8_MARK_COMPACT_H_ |
OLD | NEW |