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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 INLINE(static void MarkWhite(MarkBit mark_bit)) { | 76 INLINE(static void MarkWhite(MarkBit mark_bit)) { |
77 mark_bit.Clear(); | 77 mark_bit.Clear(); |
78 mark_bit.Next().Clear(); | 78 mark_bit.Next().Clear(); |
79 } | 79 } |
80 | 80 |
81 INLINE(static void BlackToWhite(MarkBit markbit)) { | 81 INLINE(static void BlackToWhite(MarkBit markbit)) { |
82 DCHECK(IsBlack(markbit)); | 82 DCHECK(IsBlack(markbit)); |
83 markbit.Clear(); | 83 markbit.Clear(); |
84 } | 84 } |
85 | 85 |
| 86 INLINE(static void GreyToWhite(MarkBit markbit)) { |
| 87 DCHECK(IsGrey(markbit)); |
| 88 markbit.Clear(); |
| 89 markbit.Next().Clear(); |
| 90 } |
| 91 |
86 INLINE(static void BlackToGrey(MarkBit markbit)) { | 92 INLINE(static void BlackToGrey(MarkBit markbit)) { |
87 DCHECK(IsBlack(markbit)); | 93 DCHECK(IsBlack(markbit)); |
88 markbit.Next().Set(); | 94 markbit.Next().Set(); |
89 } | 95 } |
90 | 96 |
91 INLINE(static void WhiteToGrey(MarkBit markbit)) { | 97 INLINE(static void WhiteToGrey(MarkBit markbit)) { |
92 DCHECK(IsWhite(markbit)); | 98 DCHECK(IsWhite(markbit)); |
93 markbit.Set(); | 99 markbit.Set(); |
94 markbit.Next().Set(); | 100 markbit.Next().Set(); |
95 } | 101 } |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 private: | 869 private: |
864 MarkCompactCollector* collector_; | 870 MarkCompactCollector* collector_; |
865 }; | 871 }; |
866 | 872 |
867 | 873 |
868 const char* AllocationSpaceName(AllocationSpace space); | 874 const char* AllocationSpaceName(AllocationSpace space); |
869 } // namespace internal | 875 } // namespace internal |
870 } // namespace v8 | 876 } // namespace v8 |
871 | 877 |
872 #endif // V8_HEAP_MARK_COMPACT_H_ | 878 #endif // V8_HEAP_MARK_COMPACT_H_ |
OLD | NEW |