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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 INLINE(static void BlackToGrey(HeapObject* obj)) { | 113 INLINE(static void BlackToGrey(HeapObject* obj)) { |
114 BlackToGrey(MarkBitFrom(obj)); | 114 BlackToGrey(MarkBitFrom(obj)); |
115 } | 115 } |
116 | 116 |
117 INLINE(static void AnyToGrey(MarkBit markbit)) { | 117 INLINE(static void AnyToGrey(MarkBit markbit)) { |
118 markbit.Set(); | 118 markbit.Set(); |
119 markbit.Next().Set(); | 119 markbit.Next().Set(); |
120 } | 120 } |
121 | 121 |
122 static void TransferMark(Heap* heap, Address old_start, Address new_start); | |
123 | |
124 #ifdef DEBUG | 122 #ifdef DEBUG |
125 enum ObjectColor { | 123 enum ObjectColor { |
126 BLACK_OBJECT, | 124 BLACK_OBJECT, |
127 WHITE_OBJECT, | 125 WHITE_OBJECT, |
128 GREY_OBJECT, | 126 GREY_OBJECT, |
129 IMPOSSIBLE_COLOR | 127 IMPOSSIBLE_COLOR |
130 }; | 128 }; |
131 | 129 |
132 static const char* ColorName(ObjectColor color) { | 130 static const char* ColorName(ObjectColor color) { |
133 switch (color) { | 131 switch (color) { |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 private: | 855 private: |
858 MarkCompactCollector* collector_; | 856 MarkCompactCollector* collector_; |
859 }; | 857 }; |
860 | 858 |
861 | 859 |
862 const char* AllocationSpaceName(AllocationSpace space); | 860 const char* AllocationSpaceName(AllocationSpace space); |
863 } // namespace internal | 861 } // namespace internal |
864 } // namespace v8 | 862 } // namespace v8 |
865 | 863 |
866 #endif // V8_HEAP_MARK_COMPACT_H_ | 864 #endif // V8_HEAP_MARK_COMPACT_H_ |
OLD | NEW |