Index: src/mark-compact.h |
=================================================================== |
--- src/mark-compact.h (revision 9581) |
+++ src/mark-compact.h (working copy) |
@@ -61,68 +61,52 @@ |
// Impossible markbits: 01 |
static const char* kImpossibleBitPattern; |
static inline bool IsImpossible(MarkBit mark_bit) { |
- ASSERT(strcmp(kImpossibleBitPattern, "01") == 0); |
return !mark_bit.Get() && mark_bit.Next().Get(); |
} |
// Black markbits: 10 - this is required by the sweeper. |
static const char* kBlackBitPattern; |
static inline bool IsBlack(MarkBit mark_bit) { |
- ASSERT(strcmp(kBlackBitPattern, "10") == 0); |
- ASSERT(!IsImpossible(mark_bit)); |
return mark_bit.Get() && !mark_bit.Next().Get(); |
} |
// White markbits: 00 - this is required by the mark bit clearer. |
static const char* kWhiteBitPattern; |
static inline bool IsWhite(MarkBit mark_bit) { |
- ASSERT(strcmp(kWhiteBitPattern, "00") == 0); |
- ASSERT(!IsImpossible(mark_bit)); |
return !mark_bit.Get(); |
} |
// Grey markbits: 11 |
static const char* kGreyBitPattern; |
static inline bool IsGrey(MarkBit mark_bit) { |
- ASSERT(strcmp(kGreyBitPattern, "11") == 0); |
- ASSERT(!IsImpossible(mark_bit)); |
return mark_bit.Get() && mark_bit.Next().Get(); |
} |
static inline void MarkBlack(MarkBit mark_bit) { |
mark_bit.Set(); |
mark_bit.Next().Clear(); |
- ASSERT(Marking::IsBlack(mark_bit)); |
} |
static inline void BlackToGrey(MarkBit markbit) { |
- ASSERT(IsBlack(markbit)); |
markbit.Next().Set(); |
- ASSERT(IsGrey(markbit)); |
} |
static inline void WhiteToGrey(MarkBit markbit) { |
- ASSERT(IsWhite(markbit)); |
markbit.Set(); |
markbit.Next().Set(); |
- ASSERT(IsGrey(markbit)); |
} |
static inline void GreyToBlack(MarkBit markbit) { |
- ASSERT(IsGrey(markbit)); |
markbit.Next().Clear(); |
- ASSERT(IsBlack(markbit)); |
} |
static inline void BlackToGrey(HeapObject* obj) { |
- ASSERT(obj->Size() >= 2 * kPointerSize); |
BlackToGrey(MarkBitFrom(obj)); |
} |
static inline void AnyToGrey(MarkBit markbit) { |
markbit.Set(); |
markbit.Next().Set(); |
- ASSERT(IsGrey(markbit)); |
} |
// Returns true if the the object whose mark is transferred is marked black. |
@@ -173,8 +157,6 @@ |
to_mark_bit.Next().Set(); |
is_black = false; // Was actually gray. |
} |
- ASSERT(Color(from) == Color(to)); |
- ASSERT(is_black == (Color(to) == BLACK_OBJECT)); |
return is_black; |
} |
@@ -227,7 +209,6 @@ |
inline void PushGrey(HeapObject* object) { |
ASSERT(object->IsHeapObject()); |
if (IsFull()) { |
- ASSERT(Marking::IsGrey(Marking::MarkBitFrom(object))); |
SetOverflowed(); |
} else { |
array_[top_] = object; |
@@ -246,7 +227,6 @@ |
inline void UnshiftGrey(HeapObject* object) { |
ASSERT(object->IsHeapObject()); |
if (IsFull()) { |
- ASSERT(Marking::IsGrey(Marking::MarkBitFrom(object))); |
SetOverflowed(); |
} else { |
bottom_ = ((bottom_ - 1) & mask_); |