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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 INLINE(static void BlackToGrey(HeapObject* obj)) { | 111 INLINE(static void BlackToGrey(HeapObject* obj)) { |
112 BlackToGrey(MarkBitFrom(obj)); | 112 BlackToGrey(MarkBitFrom(obj)); |
113 } | 113 } |
114 | 114 |
115 INLINE(static void AnyToGrey(MarkBit markbit)) { | 115 INLINE(static void AnyToGrey(MarkBit markbit)) { |
116 markbit.Set(); | 116 markbit.Set(); |
117 markbit.Next().Set(); | 117 markbit.Next().Set(); |
118 } | 118 } |
119 | 119 |
120 static void SetAllMarkBitsInRange(MarkBit start, MarkBit end); | |
121 static void ClearAllMarkBitsOfCellsContainedInRange(MarkBit start, | |
122 MarkBit end); | |
123 | |
124 static void TransferMark(Heap* heap, Address old_start, Address new_start); | 120 static void TransferMark(Heap* heap, Address old_start, Address new_start); |
125 | 121 |
126 #ifdef DEBUG | 122 #ifdef DEBUG |
127 enum ObjectColor { | 123 enum ObjectColor { |
128 BLACK_OBJECT, | 124 BLACK_OBJECT, |
129 WHITE_OBJECT, | 125 WHITE_OBJECT, |
130 GREY_OBJECT, | 126 GREY_OBJECT, |
131 IMPOSSIBLE_COLOR | 127 IMPOSSIBLE_COLOR |
132 }; | 128 }; |
133 | 129 |
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 private: | 992 private: |
997 MarkCompactCollector* collector_; | 993 MarkCompactCollector* collector_; |
998 }; | 994 }; |
999 | 995 |
1000 | 996 |
1001 const char* AllocationSpaceName(AllocationSpace space); | 997 const char* AllocationSpaceName(AllocationSpace space); |
1002 } | 998 } |
1003 } // namespace v8::internal | 999 } // namespace v8::internal |
1004 | 1000 |
1005 #endif // V8_HEAP_MARK_COMPACT_H_ | 1001 #endif // V8_HEAP_MARK_COMPACT_H_ |
OLD | NEW |