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_HEAP_MARK_COMPACT_H_ | 5 #ifndef V8_HEAP_MARK_COMPACT_H_ |
6 #define V8_HEAP_MARK_COMPACT_H_ | 6 #define V8_HEAP_MARK_COMPACT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 void EvacuateNewSpaceAndCandidates(); | 682 void EvacuateNewSpaceAndCandidates(); |
683 | 683 |
684 void UpdatePointersAfterEvacuation(); | 684 void UpdatePointersAfterEvacuation(); |
685 | 685 |
686 // Iterates through all live objects on a page using marking information. | 686 // Iterates through all live objects on a page using marking information. |
687 // Returns whether all objects have successfully been visited. | 687 // Returns whether all objects have successfully been visited. |
688 template <class Visitor> | 688 template <class Visitor> |
689 bool VisitLiveObjects(MemoryChunk* page, Visitor* visitor, | 689 bool VisitLiveObjects(MemoryChunk* page, Visitor* visitor, |
690 IterationMode mode); | 690 IterationMode mode); |
691 | 691 |
692 void VisitLiveObjectsBody(Page* page, ObjectVisitor* visitor); | |
693 | |
694 void RecomputeLiveBytes(MemoryChunk* page); | 692 void RecomputeLiveBytes(MemoryChunk* page); |
695 | 693 |
696 void ReleaseEvacuationCandidates(); | 694 void ReleaseEvacuationCandidates(); |
697 | 695 |
698 // Starts sweeping of a space by contributing on the main thread and setting | 696 // Starts sweeping of a space by contributing on the main thread and setting |
699 // up other pages for sweeping. | 697 // up other pages for sweeping. |
700 void StartSweepSpace(PagedSpace* space); | 698 void StartSweepSpace(PagedSpace* space); |
701 | 699 |
702 #ifdef DEBUG | 700 #ifdef DEBUG |
703 friend class MarkObjectVisitor; | 701 friend class MarkObjectVisitor; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 private: | 769 private: |
772 MarkCompactCollector* collector_; | 770 MarkCompactCollector* collector_; |
773 }; | 771 }; |
774 | 772 |
775 | 773 |
776 const char* AllocationSpaceName(AllocationSpace space); | 774 const char* AllocationSpaceName(AllocationSpace space); |
777 } // namespace internal | 775 } // namespace internal |
778 } // namespace v8 | 776 } // namespace v8 |
779 | 777 |
780 #endif // V8_HEAP_MARK_COMPACT_H_ | 778 #endif // V8_HEAP_MARK_COMPACT_H_ |
OLD | NEW |