| Index: src/heap/mark-compact.h
|
| diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
|
| index c6800993c00fabd5ac963a62e51b4d80a90ec28b..2bd53df773d49e3a3f74f96480c0c1eb9a6114e7 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,51 @@ class Marking {
|
| return mark_bit.Get() && mark_bit.Next().Get();
|
| }
|
|
|
| + // IsBlackOrGrey assumes that the first bit is set for black or grey
|
| + // objects.
|
| + INLINE(static bool IsBlackOrGrey(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 +116,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
|
|
|