Commit 6925bc09 authored by Leon Bettscheider's avatar Leon Bettscheider Committed by V8 LUCI CQ

[heap] Refactor methods and nested class of ConcurrentMarkingVisitor

This CL moves a few methods and nested class SlotSnapshottingVisitor
from ConcurrentMarkingVisitor to ConcurrentMarkingVisitorUtility.

Methods in ConcurrentMarkingVisitorUtility are now static and instead have a Visitor parameter.

This is preparatory work for adding a
YoungGenerationConcurrentMarkingVisitor class, which will be able to
reuse members of ConcurrentMarkingVisitorUtility.

Bug: v8:13012
Change-Id: I503c20e655578031018a2e37dd92c1d61bbe1686
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779677
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81931}
parent e93a09c2
This diff is collapsed.
...@@ -220,6 +220,11 @@ class MarkingVisitorBase : public HeapVisitor<int, ConcreteVisitor> { ...@@ -220,6 +220,11 @@ class MarkingVisitorBase : public HeapVisitor<int, ConcreteVisitor> {
#endif #endif
} }
bool is_shared_heap() { return is_shared_heap_; }
// Marks the object grey and pushes it on the marking work list.
V8_INLINE void MarkObject(HeapObject host, HeapObject obj);
protected: protected:
ConcreteVisitor* concrete_visitor() { ConcreteVisitor* concrete_visitor() {
return static_cast<ConcreteVisitor*>(this); return static_cast<ConcreteVisitor*>(this);
...@@ -259,8 +264,6 @@ class MarkingVisitorBase : public HeapVisitor<int, ConcreteVisitor> { ...@@ -259,8 +264,6 @@ class MarkingVisitorBase : public HeapVisitor<int, ConcreteVisitor> {
// list and visits its header. Returns the size of the descriptor array // list and visits its header. Returns the size of the descriptor array
// if it was successully marked as black. // if it was successully marked as black.
V8_INLINE int MarkDescriptorArrayBlack(DescriptorArray descriptors); V8_INLINE int MarkDescriptorArrayBlack(DescriptorArray descriptors);
// Marks the object grey and pushes it on the marking work list.
V8_INLINE void MarkObject(HeapObject host, HeapObject obj);
V8_INLINE void AddStrongReferenceForReferenceSummarizer(HeapObject host, V8_INLINE void AddStrongReferenceForReferenceSummarizer(HeapObject host,
HeapObject obj) { HeapObject obj) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment