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