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 "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/heap/spaces.h" | 9 #include "src/heap/spaces.h" |
10 | 10 |
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 | 817 |
818 // After all reachable objects have been marked those weak map entries | 818 // After all reachable objects have been marked those weak map entries |
819 // with an unreachable key are removed from all encountered weak maps. | 819 // with an unreachable key are removed from all encountered weak maps. |
820 // The linked list of all encountered weak maps is destroyed. | 820 // The linked list of all encountered weak maps is destroyed. |
821 void ClearWeakCollections(); | 821 void ClearWeakCollections(); |
822 | 822 |
823 // We have to remove all encountered weak maps from the list of weak | 823 // We have to remove all encountered weak maps from the list of weak |
824 // collections when incremental marking is aborted. | 824 // collections when incremental marking is aborted. |
825 void AbortWeakCollections(); | 825 void AbortWeakCollections(); |
826 | 826 |
| 827 |
| 828 void ProcessAndClearWeakCells(); |
| 829 void AbortWeakCells(); |
| 830 |
827 // ----------------------------------------------------------------------- | 831 // ----------------------------------------------------------------------- |
828 // Phase 2: Sweeping to clear mark bits and free non-live objects for | 832 // Phase 2: Sweeping to clear mark bits and free non-live objects for |
829 // a non-compacting collection. | 833 // a non-compacting collection. |
830 // | 834 // |
831 // Before: Live objects are marked and non-live objects are unmarked. | 835 // Before: Live objects are marked and non-live objects are unmarked. |
832 // | 836 // |
833 // After: Live objects are unmarked, non-live regions have been added to | 837 // After: Live objects are unmarked, non-live regions have been added to |
834 // their space's free list. Active eden semispace is compacted by | 838 // their space's free list. Active eden semispace is compacted by |
835 // evacuation. | 839 // evacuation. |
836 // | 840 // |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 private: | 948 private: |
945 MarkCompactCollector* collector_; | 949 MarkCompactCollector* collector_; |
946 }; | 950 }; |
947 | 951 |
948 | 952 |
949 const char* AllocationSpaceName(AllocationSpace space); | 953 const char* AllocationSpaceName(AllocationSpace space); |
950 } | 954 } |
951 } // namespace v8::internal | 955 } // namespace v8::internal |
952 | 956 |
953 #endif // V8_HEAP_MARK_COMPACT_H_ | 957 #endif // V8_HEAP_MARK_COMPACT_H_ |
OLD | NEW |