| Index: src/mark-compact.h
|
| ===================================================================
|
| --- src/mark-compact.h (revision 1851)
|
| +++ src/mark-compact.h (working copy)
|
| @@ -142,6 +142,7 @@
|
|
|
| friend class RootMarkingVisitor;
|
| friend class MarkingVisitor;
|
| + friend class UnmarkingVisitor;
|
|
|
| // Marking operations for objects reachable from roots.
|
| static void MarkLiveObjects();
|
| @@ -155,7 +156,7 @@
|
| static inline void SetMark(HeapObject* obj) {
|
| tracer_->increment_marked_count();
|
| #ifdef DEBUG
|
| - UpdateLiveObjectCount(obj);
|
| + UpdateLiveObjectCount(obj, 1);
|
| #endif
|
| obj->SetMark();
|
| }
|
| @@ -172,8 +173,12 @@
|
| static void MarkDescriptorArray(DescriptorArray* descriptors);
|
|
|
| // Mark the heap roots and all objects reachable from them.
|
| - static void ProcessRoots(RootMarkingVisitor* visitor);
|
| + static void MarkRoots(RootMarkingVisitor* visitor);
|
|
|
| + // Mark the symbol table specially. References to symbols from the
|
| + // symbol table are weak.
|
| + static void MarkSymbolTable();
|
| +
|
| // Mark objects in object groups that have at least one object in the
|
| // group marked.
|
| static void MarkObjectGroups();
|
| @@ -202,7 +207,10 @@
|
| static bool MustBeMarked(Object** p);
|
|
|
| #ifdef DEBUG
|
| - static void UpdateLiveObjectCount(HeapObject* obj);
|
| + // The scale argument is positive 1 if we are marking an object and
|
| + // -1 if we are clearing the mark bit of an object that we didn't
|
| + // actually want marked.
|
| + static void UpdateLiveObjectCount(HeapObject* obj, int scale);
|
| #endif
|
|
|
| // We sweep the large object space in the same way whether we are
|
|
|