| Index: src/mark-compact.h
|
| diff --git a/src/mark-compact.h b/src/mark-compact.h
|
| index f656dd513f34b71b4f3fa917d96cc08c4ff2eda9..24adeca7924248779aa0122f1c429ee3e6be1d72 100644
|
| --- a/src/mark-compact.h
|
| +++ b/src/mark-compact.h
|
| @@ -490,6 +490,11 @@ class MarkCompactCollector {
|
|
|
| bool TryPromoteObject(HeapObject* object, int object_size);
|
|
|
| + inline Object* encountered_weak_maps() { return encountered_weak_maps_; }
|
| + inline void set_encountered_weak_maps(Object* weak_map) {
|
| + encountered_weak_maps_ = weak_map;
|
| + }
|
| +
|
| private:
|
| MarkCompactCollector();
|
| ~MarkCompactCollector();
|
| @@ -626,6 +631,16 @@ class MarkCompactCollector {
|
| // ClearNonLiveTransitions pass or by calling this function.
|
| void ReattachInitialMaps();
|
|
|
| + // Mark all values associated with reachable keys in weak maps encountered
|
| + // so far. This might push new object or even new weak maps onto the
|
| + // marking stack.
|
| + void ProcessWeakMaps();
|
| +
|
| + // After all reachable objects have been marked those weak map entries
|
| + // with an unreachable key are removed from all encountered weak maps.
|
| + // The linked list of all encountered weak maps is destroyed.
|
| + void ClearWeakMaps();
|
| +
|
| // -----------------------------------------------------------------------
|
| // Phase 2: Sweeping to clear mark bits and free non-live objects for
|
| // a non-compacting collection.
|
| @@ -705,6 +720,7 @@ class MarkCompactCollector {
|
| Heap* heap_;
|
| MarkingDeque marking_deque_;
|
| CodeFlusher* code_flusher_;
|
| + Object* encountered_weak_maps_;
|
|
|
| List<Page*> evacuation_candidates_;
|
|
|
|
|