| 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_MARK_COMPACT_H_ | 5 #ifndef V8_MARK_COMPACT_H_ |
| 6 #define V8_MARK_COMPACT_H_ | 6 #define V8_MARK_COMPACT_H_ |
| 7 | 7 |
| 8 #include "src/compiler-intrinsics.h" | 8 #include "src/compiler-intrinsics.h" |
| 9 #include "src/spaces.h" | 9 #include "src/spaces.h" |
| 10 | 10 |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 // Mark all values associated with reachable keys in weak collections | 851 // Mark all values associated with reachable keys in weak collections |
| 852 // encountered so far. This might push new object or even new weak maps onto | 852 // encountered so far. This might push new object or even new weak maps onto |
| 853 // the marking stack. | 853 // the marking stack. |
| 854 void ProcessWeakCollections(); | 854 void ProcessWeakCollections(); |
| 855 | 855 |
| 856 // After all reachable objects have been marked those weak map entries | 856 // After all reachable objects have been marked those weak map entries |
| 857 // with an unreachable key are removed from all encountered weak maps. | 857 // with an unreachable key are removed from all encountered weak maps. |
| 858 // The linked list of all encountered weak maps is destroyed. | 858 // The linked list of all encountered weak maps is destroyed. |
| 859 void ClearWeakCollections(); | 859 void ClearWeakCollections(); |
| 860 | 860 |
| 861 // We have to remove all encountered weak maps from the list of weak |
| 862 // collections when incremental marking is aborted. |
| 863 void AbortWeakCollections(); |
| 864 |
| 861 // ----------------------------------------------------------------------- | 865 // ----------------------------------------------------------------------- |
| 862 // Phase 2: Sweeping to clear mark bits and free non-live objects for | 866 // Phase 2: Sweeping to clear mark bits and free non-live objects for |
| 863 // a non-compacting collection. | 867 // a non-compacting collection. |
| 864 // | 868 // |
| 865 // Before: Live objects are marked and non-live objects are unmarked. | 869 // Before: Live objects are marked and non-live objects are unmarked. |
| 866 // | 870 // |
| 867 // After: Live objects are unmarked, non-live regions have been added to | 871 // After: Live objects are unmarked, non-live regions have been added to |
| 868 // their space's free list. Active eden semispace is compacted by | 872 // their space's free list. Active eden semispace is compacted by |
| 869 // evacuation. | 873 // evacuation. |
| 870 // | 874 // |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 private: | 987 private: |
| 984 MarkCompactCollector* collector_; | 988 MarkCompactCollector* collector_; |
| 985 }; | 989 }; |
| 986 | 990 |
| 987 | 991 |
| 988 const char* AllocationSpaceName(AllocationSpace space); | 992 const char* AllocationSpaceName(AllocationSpace space); |
| 989 | 993 |
| 990 } } // namespace v8::internal | 994 } } // namespace v8::internal |
| 991 | 995 |
| 992 #endif // V8_MARK_COMPACT_H_ | 996 #endif // V8_MARK_COMPACT_H_ |
| OLD | NEW |