| Index: src/heap/mark-compact.h
|
| diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
|
| index e6723fd70e030d726938337d4294a0d20898d262..05cebe1dfcbd42d9d636a37a87426121326d695e 100644
|
| --- a/src/heap/mark-compact.h
|
| +++ b/src/heap/mark-compact.h
|
| @@ -327,6 +327,15 @@ class ThreadLocalTop;
|
| // Mark-Compact collector
|
| class MarkCompactCollector {
|
| public:
|
| + enum IterationMode {
|
| + kKeepMarking,
|
| + kClearMarkbits,
|
| + };
|
| +
|
| + class EvacuateNewSpaceVisitor;
|
| + class EvacuateOldSpaceVisitor;
|
| + class HeapObjectVisitor;
|
| +
|
| static void Initialize();
|
|
|
| void SetUp();
|
| @@ -703,14 +712,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);
|
|
|
|
|