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 "compiler-intrinsics.h" | 8 #include "compiler-intrinsics.h" |
9 #include "spaces.h" | 9 #include "spaces.h" |
10 | 10 |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 void ClearNonLiveReferences(); | 844 void ClearNonLiveReferences(); |
845 void ClearNonLivePrototypeTransitions(Map* map); | 845 void ClearNonLivePrototypeTransitions(Map* map); |
846 void ClearNonLiveMapTransitions(Map* map, MarkBit map_mark); | 846 void ClearNonLiveMapTransitions(Map* map, MarkBit map_mark); |
847 | 847 |
848 void ClearDependentCode(DependentCode* dependent_code); | 848 void ClearDependentCode(DependentCode* dependent_code); |
849 void ClearDependentICList(Object* head); | 849 void ClearDependentICList(Object* head); |
850 void ClearNonLiveDependentCode(DependentCode* dependent_code); | 850 void ClearNonLiveDependentCode(DependentCode* dependent_code); |
851 int ClearNonLiveDependentCodeInGroup(DependentCode* dependent_code, int group, | 851 int ClearNonLiveDependentCodeInGroup(DependentCode* dependent_code, int group, |
852 int start, int end, int new_start); | 852 int start, int end, int new_start); |
853 | 853 |
854 // Marking detaches initial maps from SharedFunctionInfo objects | |
855 // to make this reference weak. We need to reattach initial maps | |
856 // back after collection. This is either done during | |
857 // ClearNonLiveTransitions pass or by calling this function. | |
858 void ReattachInitialMaps(); | |
859 | |
860 // Mark all values associated with reachable keys in weak collections | 854 // Mark all values associated with reachable keys in weak collections |
861 // encountered so far. This might push new object or even new weak maps onto | 855 // encountered so far. This might push new object or even new weak maps onto |
862 // the marking stack. | 856 // the marking stack. |
863 void ProcessWeakCollections(); | 857 void ProcessWeakCollections(); |
864 | 858 |
865 // After all reachable objects have been marked those weak map entries | 859 // After all reachable objects have been marked those weak map entries |
866 // with an unreachable key are removed from all encountered weak maps. | 860 // with an unreachable key are removed from all encountered weak maps. |
867 // The linked list of all encountered weak maps is destroyed. | 861 // The linked list of all encountered weak maps is destroyed. |
868 void ClearWeakCollections(); | 862 void ClearWeakCollections(); |
869 | 863 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 private: | 984 private: |
991 MarkCompactCollector* collector_; | 985 MarkCompactCollector* collector_; |
992 }; | 986 }; |
993 | 987 |
994 | 988 |
995 const char* AllocationSpaceName(AllocationSpace space); | 989 const char* AllocationSpaceName(AllocationSpace space); |
996 | 990 |
997 } } // namespace v8::internal | 991 } } // namespace v8::internal |
998 | 992 |
999 #endif // V8_MARK_COMPACT_H_ | 993 #endif // V8_MARK_COMPACT_H_ |
OLD | NEW |