Index: src/heap/mark-compact.h |
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h |
index b1ad5b8a80ee6547e9a03708a473a46c913822ce..089aca3dcda9ded6a472d06ea64dc39ef5abdeff 100644 |
--- a/src/heap/mark-compact.h |
+++ b/src/heap/mark-compact.h |
@@ -517,9 +517,9 @@ class MarkCompactCollector { |
// Performs a global garbage collection. |
void CollectGarbage(); |
- enum CompactionMode { INCREMENTAL_COMPACTION, NON_INCREMENTAL_COMPACTION }; |
+ enum MarkingMode { INCREMENTAL, NON_INCREMENTAL }; |
- bool StartCompaction(CompactionMode mode); |
+ bool StartCompaction(MarkingMode mode); |
void AbortCompaction(); |
@@ -771,12 +771,6 @@ class MarkCompactCollector { |
// otherwise a map can die and deoptimize the code. |
void ProcessTopOptimizedFrame(ObjectVisitor* visitor); |
- // Mark objects reachable (transitively) from objects in the marking |
- // stack. This function empties the marking stack, but may leave |
- // overflowed objects in the heap, in which case the marking stack's |
- // overflow flag will be set. |
- void EmptyMarkingDeque(); |
- |
// Refill the marking stack with overflowed objects from the heap. This |
// function either leaves the marking stack full or clears the overflow |
// flag on the marking stack. |
@@ -866,6 +860,21 @@ class MarkCompactCollector { |
// Updates store buffer and slot buffer for a pointer in a migrating object. |
void RecordMigratedSlot(Object* value, Address slot); |
+ MarkingDeque* marking_deque() { return &marking_deque_; } |
+ |
+ void EnsureMarkingDequeIsCommittedAndInitialize(); |
+ |
+ void InitializeMarkingDeque(); |
+ |
+ void UncommitMarkingDeque(); |
+ |
+ // Mark objects reachable (transitively) from objects in the marking |
+ // stack. This function empties the marking stack, but may leave |
+ // overflowed objects in the heap, in which case the marking stack's |
+ // overflow flag will be set. |
+ template <MarkingMode mode> |
+ void EmptyMarkingDeque(); |
+ |
#ifdef DEBUG |
friend class MarkObjectVisitor; |
static void VisitObject(HeapObject* obj); |
@@ -875,6 +884,8 @@ class MarkCompactCollector { |
#endif |
Heap* heap_; |
+ base::VirtualMemory* marking_deque_memory_; |
+ bool marking_deque_memory_committed_; |
MarkingDeque marking_deque_; |
CodeFlusher* code_flusher_; |
bool have_code_to_deoptimize_; |
@@ -885,6 +896,8 @@ class MarkCompactCollector { |
SmartPointer<FreeList> free_list_old_data_space_; |
SmartPointer<FreeList> free_list_old_pointer_space_; |
+ friend class IncrementalMarking; |
+ friend class IncrementalMarkingMarkingVisitor; |
friend class Heap; |
}; |