Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index 484497f087f418c5fb40f51679568d1bbf99bd13..40194e36125618b85cd50125da628b76d1edf712 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -1099,13 +1099,6 @@ void MarkCompactCollector::MarkLiveObjects() { |
} |
-static int CountMarkedCallback(HeapObject* obj) { |
- MapWord map_word = obj->map_word(); |
- map_word.ClearMark(); |
- return obj->SizeFromMap(map_word.ToMap()); |
-} |
- |
- |
#ifdef DEBUG |
void MarkCompactCollector::UpdateLiveObjectCount(HeapObject* obj) { |
live_bytes_ += obj->Size(); |
@@ -1152,7 +1145,7 @@ bool MarkCompactCollector::SafeIsMap(HeapObject* object) { |
void MarkCompactCollector::ClearNonLiveTransitions() { |
- HeapObjectIterator map_iterator(Heap::map_space(), &CountMarkedCallback); |
+ HeapObjectIterator map_iterator(Heap::map_space(), &SizeOfMarkedObject); |
// Iterate over the map space, setting map transitions that go from |
// a marked map to an unmarked map to null transitions. At the same time, |
// set all the prototype fields of maps back to their original value, |
@@ -2673,6 +2666,13 @@ void MarkCompactCollector::ReportDeleteIfNeeded(HeapObject* obj) { |
} |
+int MarkCompactCollector::SizeOfMarkedObject(HeapObject* obj) { |
+ MapWord map_word = obj->map_word(); |
+ map_word.ClearMark(); |
+ return obj->SizeFromMap(map_word.ToMap()); |
+} |
+ |
+ |
void MarkCompactCollector::Initialize() { |
StaticPointersToNewGenUpdatingVisitor::Initialize(); |
StaticMarkingVisitor::Initialize(); |