| 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 | 679 |
| 680 bool is_compacting() const { return compacting_; } | 680 bool is_compacting() const { return compacting_; } |
| 681 | 681 |
| 682 MarkingParity marking_parity() { return marking_parity_; } | 682 MarkingParity marking_parity() { return marking_parity_; } |
| 683 | 683 |
| 684 // Concurrent and parallel sweeping support. | 684 // Concurrent and parallel sweeping support. |
| 685 void SweepInParallel(PagedSpace* space, | 685 void SweepInParallel(PagedSpace* space, |
| 686 FreeList* private_free_list, | 686 FreeList* private_free_list, |
| 687 FreeList* free_list); | 687 FreeList* free_list); |
| 688 | 688 |
| 689 void WaitUntilSweepingCompleted(); | 689 bool WaitUntilSweepingCompleted(); |
| 690 | 690 |
| 691 intptr_t StealMemoryFromSweeperThreads(PagedSpace* space); | 691 intptr_t StealMemoryFromSweeperThreads(PagedSpace* space); |
| 692 | 692 |
| 693 bool AreSweeperThreadsActivated(); | 693 bool AreSweeperThreadsActivated(); |
| 694 | 694 |
| 695 bool IsConcurrentSweepingInProgress(); | 695 bool IsConcurrentSweepingInProgress(); |
| 696 | 696 |
| 697 void FinalizeSweeping(); |
| 698 |
| 697 // Parallel marking support. | 699 // Parallel marking support. |
| 698 void MarkInParallel(); | 700 void MarkInParallel(); |
| 699 | 701 |
| 700 void WaitUntilMarkingCompleted(); | 702 void WaitUntilMarkingCompleted(); |
| 701 | 703 |
| 702 private: | 704 private: |
| 703 MarkCompactCollector(); | 705 MarkCompactCollector(); |
| 704 ~MarkCompactCollector(); | 706 ~MarkCompactCollector(); |
| 705 | 707 |
| 706 bool MarkInvalidatedCode(); | 708 bool MarkInvalidatedCode(); |
| 707 void RemoveDeadInvalidatedCode(); | 709 void RemoveDeadInvalidatedCode(); |
| 708 void ProcessInvalidatedCode(ObjectVisitor* visitor); | 710 void ProcessInvalidatedCode(ObjectVisitor* visitor); |
| 709 | 711 |
| 712 void ReleaseEvacuationCandidates(); |
| 713 |
| 710 void StartSweeperThreads(); | 714 void StartSweeperThreads(); |
| 711 | 715 |
| 712 #ifdef DEBUG | 716 #ifdef DEBUG |
| 713 enum CollectorState { | 717 enum CollectorState { |
| 714 IDLE, | 718 IDLE, |
| 715 PREPARE_GC, | 719 PREPARE_GC, |
| 716 MARK_LIVE_OBJECTS, | 720 MARK_LIVE_OBJECTS, |
| 717 SWEEP_SPACES, | 721 SWEEP_SPACES, |
| 718 ENCODE_FORWARDING_ADDRESSES, | 722 ENCODE_FORWARDING_ADDRESSES, |
| 719 UPDATE_POINTERS, | 723 UPDATE_POINTERS, |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 | 900 |
| 897 friend class Heap; | 901 friend class Heap; |
| 898 }; | 902 }; |
| 899 | 903 |
| 900 | 904 |
| 901 const char* AllocationSpaceName(AllocationSpace space); | 905 const char* AllocationSpaceName(AllocationSpace space); |
| 902 | 906 |
| 903 } } // namespace v8::internal | 907 } } // namespace v8::internal |
| 904 | 908 |
| 905 #endif // V8_MARK_COMPACT_H_ | 909 #endif // V8_MARK_COMPACT_H_ |
| OLD | NEW |