| 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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 // Callback function for telling whether the object *p is an unmarked | 801 // Callback function for telling whether the object *p is an unmarked |
| 802 // heap object. | 802 // heap object. |
| 803 static bool IsUnmarkedHeapObject(Object** p); | 803 static bool IsUnmarkedHeapObject(Object** p); |
| 804 static bool IsUnmarkedHeapObjectWithHeap(Heap* heap, Object** p); | 804 static bool IsUnmarkedHeapObjectWithHeap(Heap* heap, Object** p); |
| 805 | 805 |
| 806 // Map transitions from a live map to a dead map must be killed. | 806 // Map transitions from a live map to a dead map must be killed. |
| 807 // We replace them with a null descriptor, with the same key. | 807 // We replace them with a null descriptor, with the same key. |
| 808 void ClearNonLiveReferences(); | 808 void ClearNonLiveReferences(); |
| 809 void ClearNonLivePrototypeTransitions(Map* map); | 809 void ClearNonLivePrototypeTransitions(Map* map); |
| 810 void ClearNonLiveMapTransitions(Map* map, MarkBit map_mark); | 810 void ClearNonLiveMapTransitions(Map* map, MarkBit map_mark); |
| 811 void ClearMapTransitions(Map* map, Map* dead_transition); | 811 void ClearMapTransitions(Map* map); |
| 812 bool ClearMapBackPointer(Map* map); | 812 bool ClearMapBackPointer(Map* map); |
| 813 void TrimDescriptorArray(Map* map, DescriptorArray* descriptors, | 813 void TrimDescriptorArray(Map* map, DescriptorArray* descriptors, |
| 814 int number_of_own_descriptors); | 814 int number_of_own_descriptors); |
| 815 void TrimEnumCache(Map* map, DescriptorArray* descriptors); | 815 void TrimEnumCache(Map* map, DescriptorArray* descriptors); |
| 816 | 816 |
| 817 // Mark all values associated with reachable keys in weak collections | 817 // Mark all values associated with reachable keys in weak collections |
| 818 // encountered so far. This might push new object or even new weak maps onto | 818 // encountered so far. This might push new object or even new weak maps onto |
| 819 // the marking stack. | 819 // the marking stack. |
| 820 void ProcessWeakCollections(); | 820 void ProcessWeakCollections(); |
| 821 | 821 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 private: | 954 private: |
| 955 MarkCompactCollector* collector_; | 955 MarkCompactCollector* collector_; |
| 956 }; | 956 }; |
| 957 | 957 |
| 958 | 958 |
| 959 const char* AllocationSpaceName(AllocationSpace space); | 959 const char* AllocationSpaceName(AllocationSpace space); |
| 960 } | 960 } |
| 961 } // namespace v8::internal | 961 } // namespace v8::internal |
| 962 | 962 |
| 963 #endif // V8_HEAP_MARK_COMPACT_H_ | 963 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |