| Index: src/heap/mark-compact.h
|
| diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
|
| index 9952b7953dfb154e73e81eccfb4e260a04a3e98b..c40989596c9939027ef7189e2ae18ecd41a1e46a 100644
|
| --- a/src/heap/mark-compact.h
|
| +++ b/src/heap/mark-compact.h
|
| @@ -46,6 +46,76 @@ class ObjectMarking : public AllStatic {
|
| return Marking::Color(ObjectMarking::MarkBitFrom(obj));
|
| }
|
|
|
| + V8_INLINE static bool IsImpossible(HeapObject* obj) {
|
| + return Marking::IsImpossible(MarkBitFrom(obj));
|
| + }
|
| +
|
| + V8_INLINE static bool IsBlack(HeapObject* obj) {
|
| + return Marking::IsBlack(MarkBitFrom(obj));
|
| + }
|
| +
|
| + V8_INLINE static bool IsWhite(HeapObject* obj) {
|
| + return Marking::IsWhite(MarkBitFrom(obj));
|
| + }
|
| +
|
| + V8_INLINE static bool IsGrey(HeapObject* obj) {
|
| + return Marking::IsGrey(MarkBitFrom(obj));
|
| + }
|
| +
|
| + V8_INLINE static bool IsBlackOrGrey(HeapObject* obj) {
|
| + return Marking::IsBlackOrGrey(MarkBitFrom(obj));
|
| + }
|
| +
|
| + V8_INLINE static void ClearMarkBit(HeapObject* obj) {
|
| + Marking::MarkWhite(MarkBitFrom(obj));
|
| + }
|
| +
|
| + V8_INLINE static void BlackToWhite(HeapObject* obj) {
|
| + DCHECK(IsBlack(obj));
|
| + MarkBit markbit = MarkBitFrom(obj);
|
| + Marking::BlackToWhite(markbit);
|
| + MemoryChunk::IncrementLiveBytes(obj, -obj->Size());
|
| + }
|
| +
|
| + V8_INLINE static void GreyToWhite(HeapObject* obj) {
|
| + DCHECK(IsGrey(obj));
|
| + Marking::GreyToWhite(MarkBitFrom(obj));
|
| + }
|
| +
|
| + V8_INLINE static void BlackToGrey(HeapObject* obj) {
|
| + DCHECK(IsBlack(obj));
|
| + MarkBit markbit = MarkBitFrom(obj);
|
| + Marking::BlackToGrey(markbit);
|
| + MemoryChunk::IncrementLiveBytes(obj, -obj->Size());
|
| + }
|
| +
|
| + V8_INLINE static void WhiteToGrey(HeapObject* obj) {
|
| + DCHECK(IsWhite(obj));
|
| + Marking::WhiteToGrey(MarkBitFrom(obj));
|
| + }
|
| +
|
| + V8_INLINE static void WhiteToBlack(HeapObject* obj) {
|
| + DCHECK(IsWhite(obj));
|
| + MarkBit markbit = MarkBitFrom(obj);
|
| + Marking::WhiteToBlack(markbit);
|
| + MemoryChunk::IncrementLiveBytes(obj, obj->Size());
|
| + }
|
| +
|
| + V8_INLINE static void GreyToBlack(HeapObject* obj) {
|
| + DCHECK(IsGrey(obj));
|
| + MarkBit markbit = MarkBitFrom(obj);
|
| + Marking::GreyToBlack(markbit);
|
| + MemoryChunk::IncrementLiveBytes(obj, obj->Size());
|
| + }
|
| +
|
| + V8_INLINE static void AnyToGrey(HeapObject* obj) {
|
| + MarkBit markbit = MarkBitFrom(obj);
|
| + if (Marking::IsBlack(markbit)) {
|
| + MemoryChunk::IncrementLiveBytes(obj, -obj->Size());
|
| + }
|
| + Marking::AnyToGrey(markbit);
|
| + }
|
| +
|
| private:
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectMarking);
|
| };
|
| @@ -595,7 +665,7 @@ class MarkCompactCollector {
|
|
|
| // Marks the object black assuming that it is not yet marked.
|
| // This is for non-incremental marking only.
|
| - INLINE(void SetMark(HeapObject* obj, MarkBit mark_bit));
|
| + INLINE(void SetMark(HeapObject* obj));
|
|
|
| // Mark the heap roots and all objects reachable from them.
|
| void MarkRoots(RootMarkingVisitor<MarkCompactMode::FULL>* visitor);
|
|
|