| Index: src/heap/mark-compact.h
|
| diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
|
| index 3ffeeed7b17aa2961ca9a48e7544b685aae8736f..5dd880db9a1786da59b1f78c3628fc23a1c4e601 100644
|
| --- a/src/heap/mark-compact.h
|
| +++ b/src/heap/mark-compact.h
|
| @@ -50,7 +50,10 @@ class Marking {
|
|
|
| // White markbits: 00 - this is required by the mark bit clearer.
|
| static const char* kWhiteBitPattern;
|
| - INLINE(static bool IsWhite(MarkBit mark_bit)) { return !mark_bit.Get(); }
|
| + INLINE(static bool IsWhite(MarkBit mark_bit)) {
|
| + DCHECK(!IsImpossible(mark_bit));
|
| + return !mark_bit.Get();
|
| + }
|
|
|
| // Grey markbits: 11
|
| static const char* kGreyBitPattern;
|
| @@ -58,19 +61,49 @@ class Marking {
|
| return mark_bit.Get() && mark_bit.Next().Get();
|
| }
|
|
|
| + INLINE(static bool IsMarked(MarkBit mark_bit)) { return mark_bit.Get(); }
|
| +
|
| INLINE(static void MarkBlack(MarkBit mark_bit)) {
|
| mark_bit.Set();
|
| mark_bit.Next().Clear();
|
| }
|
|
|
| - INLINE(static void BlackToGrey(MarkBit markbit)) { markbit.Next().Set(); }
|
| + INLINE(static void MarkWhite(MarkBit mark_bit)) {
|
| + mark_bit.Clear();
|
| + mark_bit.Next().Clear();
|
| + }
|
| +
|
| + INLINE(static void BlackToWhite(MarkBit markbit)) {
|
| + DCHECK(IsBlack(markbit));
|
| + markbit.Clear();
|
| + }
|
| +
|
| + INLINE(static void GreyToWhite(MarkBit markbit)) {
|
| + DCHECK(IsGrey(markbit));
|
| + markbit.Clear();
|
| + markbit.Next().Clear();
|
| + }
|
| +
|
| + INLINE(static void BlackToGrey(MarkBit markbit)) {
|
| + DCHECK(IsBlack(markbit));
|
| + markbit.Next().Set();
|
| + }
|
|
|
| INLINE(static void WhiteToGrey(MarkBit markbit)) {
|
| + DCHECK(IsWhite(markbit));
|
| markbit.Set();
|
| markbit.Next().Set();
|
| }
|
|
|
| - INLINE(static void GreyToBlack(MarkBit markbit)) { markbit.Next().Clear(); }
|
| + INLINE(static void WhiteToBlack(MarkBit markbit)) {
|
| + DCHECK(IsWhite(markbit));
|
| + markbit.Set();
|
| + }
|
| +
|
| + INLINE(static void GreyToBlack(MarkBit markbit)) {
|
| + DCHECK(IsGrey(markbit));
|
| + markbit.Next().Clear();
|
| + }
|
|
|
| INLINE(static void BlackToGrey(HeapObject* obj)) {
|
| BlackToGrey(MarkBitFrom(obj));
|
| @@ -81,6 +114,10 @@ class Marking {
|
| markbit.Next().Set();
|
| }
|
|
|
| + static void SetAllMarkBitsInRange(MarkBit start, MarkBit end);
|
| + static void ClearAllMarkBitsOfCellsContainedInRange(MarkBit start,
|
| + MarkBit end);
|
| +
|
| void TransferMark(Address old_start, Address new_start);
|
|
|
| #ifdef DEBUG
|
|
|