Index: src/heap/mark-compact.h |
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h |
index d0fb955d8bc7499a1cbbbbedc22fd4a406737275..e950e7217c2a158845a3d52dc87e5514a017015f 100644 |
--- a/src/heap/mark-compact.h |
+++ b/src/heap/mark-compact.h |
@@ -329,6 +329,15 @@ class ThreadLocalTop; |
// Mark-Compact collector |
class MarkCompactCollector { |
public: |
+ enum IterationMode { |
+ kKeepMarking, |
+ kClearMarkbits, |
+ }; |
+ |
+ class HeapObjectVisitor; |
+ class EvacuateNewSpaceVisitor; |
+ class EvacuateOldSpaceVisitor; |
+ |
static void Initialize(); |
void SetUp(); |
@@ -699,14 +708,13 @@ class MarkCompactCollector { |
// regions to each space's free list. |
void SweepSpaces(); |
- int DiscoverAndEvacuateBlackObjectsOnPage(NewSpace* new_space, |
- NewSpacePage* p); |
+ // Iterates through all live objects on a page using marking information. |
+ // Returns whether all objects have successfully been visited. |
+ bool IterateLiveObjectsOnPage(MemoryChunk* page, HeapObjectVisitor* visitor, |
+ IterationMode mode); |
void EvacuateNewSpace(); |
- bool EvacuateLiveObjectsFromPage(Page* p, PagedSpace* target_space, |
- SlotsBuffer** evacuation_slots_buffer); |
- |
void AddEvacuationSlotsBufferSynchronized( |
SlotsBuffer* evacuation_slots_buffer); |