| 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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 // stack. This function empties the marking stack, but may leave | 779 // stack. This function empties the marking stack, but may leave |
| 780 // overflowed objects in the heap, in which case the marking stack's | 780 // overflowed objects in the heap, in which case the marking stack's |
| 781 // overflow flag will be set. | 781 // overflow flag will be set. |
| 782 void EmptyMarkingDeque(); | 782 void EmptyMarkingDeque(); |
| 783 | 783 |
| 784 // Refill the marking stack with overflowed objects from the heap. This | 784 // Refill the marking stack with overflowed objects from the heap. This |
| 785 // function either leaves the marking stack full or clears the overflow | 785 // function either leaves the marking stack full or clears the overflow |
| 786 // flag on the marking stack. | 786 // flag on the marking stack. |
| 787 void RefillMarkingDeque(); | 787 void RefillMarkingDeque(); |
| 788 | 788 |
| 789 // After reachable maps have been marked process per context object | |
| 790 // literal map caches removing unmarked entries. | |
| 791 void ProcessMapCaches(); | |
| 792 | |
| 793 // Callback function for telling whether the object *p is an unmarked | 789 // Callback function for telling whether the object *p is an unmarked |
| 794 // heap object. | 790 // heap object. |
| 795 static bool IsUnmarkedHeapObject(Object** p); | 791 static bool IsUnmarkedHeapObject(Object** p); |
| 796 static bool IsUnmarkedHeapObjectWithHeap(Heap* heap, Object** p); | 792 static bool IsUnmarkedHeapObjectWithHeap(Heap* heap, Object** p); |
| 797 | 793 |
| 798 // Map transitions from a live map to a dead map must be killed. | 794 // Map transitions from a live map to a dead map must be killed. |
| 799 // We replace them with a null descriptor, with the same key. | 795 // We replace them with a null descriptor, with the same key. |
| 800 void ClearNonLiveReferences(); | 796 void ClearNonLiveReferences(); |
| 801 void ClearNonLivePrototypeTransitions(Map* map); | 797 void ClearNonLivePrototypeTransitions(Map* map); |
| 802 void ClearNonLiveMapTransitions(Map* map, MarkBit map_mark); | 798 void ClearNonLiveMapTransitions(Map* map, MarkBit map_mark); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 private: | 946 private: |
| 951 MarkCompactCollector* collector_; | 947 MarkCompactCollector* collector_; |
| 952 }; | 948 }; |
| 953 | 949 |
| 954 | 950 |
| 955 const char* AllocationSpaceName(AllocationSpace space); | 951 const char* AllocationSpaceName(AllocationSpace space); |
| 956 } | 952 } |
| 957 } // namespace v8::internal | 953 } // namespace v8::internal |
| 958 | 954 |
| 959 #endif // V8_HEAP_MARK_COMPACT_H_ | 955 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |