Index: src/heap/mark-compact.h |
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h |
index 322965decdd4e6d57a403f152c85ab8a07c26c16..e8f5c63fe3925a9dcbe3197cf5f31af52b332845 100644 |
--- a/src/heap/mark-compact.h |
+++ b/src/heap/mark-compact.h |
@@ -244,6 +244,7 @@ class MarkingDeque { |
INLINE(void UnshiftGrey(HeapObject* object)) { |
DCHECK(object->IsHeapObject()); |
+ DCHECK(Marking::IsGrey(Marking::MarkBitFrom(object))); |
if (IsFull()) { |
SetOverflowed(); |
} else { |
@@ -252,6 +253,19 @@ class MarkingDeque { |
} |
} |
+ INLINE(void UnshiftBlack(HeapObject* object)) { |
+ DCHECK(object->IsHeapObject()); |
+ DCHECK(Marking::IsBlack(Marking::MarkBitFrom(object))); |
+ if (IsFull()) { |
+ Marking::BlackToGrey(object); |
+ MemoryChunk::IncrementLiveBytesFromGC(object->address(), -object->Size()); |
+ SetOverflowed(); |
+ } else { |
+ bottom_ = ((bottom_ - 1) & mask_); |
+ array_[bottom_] = object; |
+ } |
+ } |
+ |
HeapObject** array() { return array_; } |
int bottom() { return bottom_; } |
int top() { return top_; } |