| Index: Source/platform/heap/Heap.h
|
| diff --git a/Source/platform/heap/Heap.h b/Source/platform/heap/Heap.h
|
| index 52ecf0673835cac59fe74693cd537382b00f4b97..6d85b0078cfafba436af5344f2233dc0ceb4df1c 100644
|
| --- a/Source/platform/heap/Heap.h
|
| +++ b/Source/platform/heap/Heap.h
|
| @@ -401,11 +401,26 @@ public:
|
| bool terminating() { return m_terminating; }
|
| void setTerminating() { m_terminating = true; }
|
|
|
| + void markAsLazilySwept();
|
| + bool hasBeenLazilySwept() const;
|
| +
|
| private:
|
| PageMemory* m_storage;
|
| ThreadState* m_threadState;
|
| // Whether the page is part of a terminating thread or not.
|
| bool m_terminating;
|
| +
|
| +protected:
|
| + // Track the (lazy) sweeping state of a page. The page's
|
| + // ThreadState keeps a sweep token value, with the page being
|
| + // updated with that value as it is swept.
|
| + //
|
| + // By comparing the ThreadState's current sweep token value with
|
| + // the page's sweep status, its swept/unswept status can
|
| + // readily be determined.
|
| + //
|
| + // 0 represents the unused/no-toggle state.
|
| + unsigned m_sweepStatus : 2;
|
| };
|
|
|
| class HeapPage final : public BaseHeapPage {
|
| @@ -818,6 +833,15 @@ public:
|
| static bool containedInHeapOrOrphanedPage(void*);
|
| #endif
|
|
|
| + // Is the finalizable GC object still alive? If no GC is in progress,
|
| + // it must be true. If a lazy sweep is in progress, it will be true if
|
| + // the object has been marked. An unmarked object is otherwise
|
| + // slated for finalization once swept, and false is returned.
|
| + //
|
| + // The predicate must not be used with already finalized object
|
| + // references.
|
| + static bool isFinalizedObjectAlive(const void*);
|
| +
|
| // Push a trace callback on the marking stack.
|
| static void pushTraceCallback(void* containerObject, TraceCallback);
|
|
|
|
|