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