Index: src/heap/spaces.cc |
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc |
index bb6a25fca97b30d98b87e014e20ad86c154ccc00..4c940a82dd8825138ff7c6a4d7116799c282f1fe 100644 |
--- a/src/heap/spaces.cc |
+++ b/src/heap/spaces.cc |
@@ -1459,7 +1459,7 @@ void PagedSpace::Verify(ObjectVisitor* visitor) { |
// All the interior pointers should be contained in the heap. |
int size = object->Size(); |
object->IterateBody(map->instance_type(), size, visitor); |
- if (Marking::IsBlack(ObjectMarking::MarkBitFrom(object))) { |
+ if (ObjectMarking::IsBlack(object)) { |
black_size += size; |
} |
@@ -2990,7 +2990,8 @@ AllocationResult LargeObjectSpace::AllocateRaw(int object_size, |
AllocationStep(object->address(), object_size); |
if (heap()->incremental_marking()->black_allocation()) { |
- Marking::MarkBlack(ObjectMarking::MarkBitFrom(object)); |
+ // We cannot use ObjectMarking here as the object still lacks a size. |
+ Marking::WhiteToBlack(ObjectMarking::MarkBitFrom(object)); |
MemoryChunk::IncrementLiveBytes(object, object_size); |
} |
return object; |
@@ -3039,9 +3040,8 @@ void LargeObjectSpace::ClearMarkingStateOfLiveObjects() { |
LargePage* current = first_page_; |
while (current != NULL) { |
HeapObject* object = current->GetObject(); |
- MarkBit mark_bit = ObjectMarking::MarkBitFrom(object); |
- DCHECK(Marking::IsBlack(mark_bit)); |
- Marking::BlackToWhite(mark_bit); |
+ DCHECK(ObjectMarking::IsBlack(object)); |
+ ObjectMarking::BlackToWhite(object); |
Page::FromAddress(object->address())->ResetProgressBar(); |
Page::FromAddress(object->address())->ResetLiveBytes(); |
current = current->next_page(); |
@@ -3086,9 +3086,8 @@ void LargeObjectSpace::FreeUnmarkedObjects() { |
LargePage* current = first_page_; |
while (current != NULL) { |
HeapObject* object = current->GetObject(); |
- MarkBit mark_bit = ObjectMarking::MarkBitFrom(object); |
- DCHECK(!Marking::IsGrey(mark_bit)); |
- if (Marking::IsBlack(mark_bit)) { |
+ DCHECK(!ObjectMarking::IsGrey(object)); |
+ if (ObjectMarking::IsBlack(object)) { |
Address free_start; |
if ((free_start = current->GetAddressToShrink()) != 0) { |
// TODO(hpayer): Perform partial free concurrently. |
@@ -3223,7 +3222,7 @@ void Page::Print() { |
unsigned mark_size = 0; |
for (HeapObject* object = objects.Next(); object != NULL; |
object = objects.Next()) { |
- bool is_marked = Marking::IsBlackOrGrey(ObjectMarking::MarkBitFrom(object)); |
+ bool is_marked = ObjectMarking::IsBlackOrGrey(object); |
PrintF(" %c ", (is_marked ? '!' : ' ')); // Indent a little. |
if (is_marked) { |
mark_size += object->Size(); |