mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibGC: Rename remaining occurrence of marked vector
In 3bfb0534be
`MarkedVector` was renamed to `RootVector`, but some
related symbols were missed. This commit corrects this.
This commit is contained in:
parent
49bdda1475
commit
01f8ab35f1
Notes:
github-actions[bot]
2025-01-02 23:23:26 +00:00
Author: https://github.com/InvalidUsernameException
Commit: 01f8ab35f1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3107
Reviewed-by: https://github.com/ADKaster ✅
3 changed files with 13 additions and 13 deletions
|
@ -267,7 +267,7 @@ void Heap::gather_roots(HashMap<Cell*, HeapRoot>& roots)
|
|||
for (auto& root : m_roots)
|
||||
roots.set(root.cell(), HeapRoot { .type = HeapRoot::Type::Root, .location = &root.source_location() });
|
||||
|
||||
for (auto& vector : m_marked_vectors)
|
||||
for (auto& vector : m_root_vectors)
|
||||
vector.gather_roots(roots);
|
||||
|
||||
if constexpr (HEAP_DEBUG) {
|
||||
|
|
|
@ -61,8 +61,8 @@ public:
|
|||
void did_create_root(Badge<RootImpl>, RootImpl&);
|
||||
void did_destroy_root(Badge<RootImpl>, RootImpl&);
|
||||
|
||||
void did_create_marked_vector(Badge<RootVectorBase>, RootVectorBase&);
|
||||
void did_destroy_marked_vector(Badge<RootVectorBase>, RootVectorBase&);
|
||||
void did_create_root_vector(Badge<RootVectorBase>, RootVectorBase&);
|
||||
void did_destroy_root_vector(Badge<RootVectorBase>, RootVectorBase&);
|
||||
|
||||
void did_create_conservative_vector(Badge<ConservativeVectorBase>, ConservativeVectorBase&);
|
||||
void did_destroy_conservative_vector(Badge<ConservativeVectorBase>, ConservativeVectorBase&);
|
||||
|
@ -139,7 +139,7 @@ private:
|
|||
CellAllocator::List m_all_cell_allocators;
|
||||
|
||||
RootImpl::List m_roots;
|
||||
RootVectorBase::List m_marked_vectors;
|
||||
RootVectorBase::List m_root_vectors;
|
||||
ConservativeVectorBase::List m_conservative_vectors;
|
||||
WeakContainer::List m_weak_containers;
|
||||
|
||||
|
@ -165,16 +165,16 @@ inline void Heap::did_destroy_root(Badge<RootImpl>, RootImpl& impl)
|
|||
m_roots.remove(impl);
|
||||
}
|
||||
|
||||
inline void Heap::did_create_marked_vector(Badge<RootVectorBase>, RootVectorBase& vector)
|
||||
inline void Heap::did_create_root_vector(Badge<RootVectorBase>, RootVectorBase& vector)
|
||||
{
|
||||
VERIFY(!m_marked_vectors.contains(vector));
|
||||
m_marked_vectors.append(vector);
|
||||
VERIFY(!m_root_vectors.contains(vector));
|
||||
m_root_vectors.append(vector);
|
||||
}
|
||||
|
||||
inline void Heap::did_destroy_marked_vector(Badge<RootVectorBase>, RootVectorBase& vector)
|
||||
inline void Heap::did_destroy_root_vector(Badge<RootVectorBase>, RootVectorBase& vector)
|
||||
{
|
||||
VERIFY(m_marked_vectors.contains(vector));
|
||||
m_marked_vectors.remove(vector);
|
||||
VERIFY(m_root_vectors.contains(vector));
|
||||
m_root_vectors.remove(vector);
|
||||
}
|
||||
|
||||
inline void Heap::did_create_conservative_vector(Badge<ConservativeVectorBase>, ConservativeVectorBase& vector)
|
||||
|
|
|
@ -13,12 +13,12 @@ namespace GC {
|
|||
RootVectorBase::RootVectorBase(Heap& heap)
|
||||
: m_heap(&heap)
|
||||
{
|
||||
m_heap->did_create_marked_vector({}, *this);
|
||||
m_heap->did_create_root_vector({}, *this);
|
||||
}
|
||||
|
||||
RootVectorBase::~RootVectorBase()
|
||||
{
|
||||
m_heap->did_destroy_marked_vector({}, *this);
|
||||
m_heap->did_destroy_root_vector({}, *this);
|
||||
}
|
||||
|
||||
RootVectorBase& RootVectorBase::operator=(RootVectorBase const& other)
|
||||
|
@ -27,7 +27,7 @@ RootVectorBase& RootVectorBase::operator=(RootVectorBase const& other)
|
|||
m_heap = other.m_heap;
|
||||
|
||||
// NOTE: IntrusiveList will remove this RootVectorBase from the old heap it was part of.
|
||||
m_heap->did_create_marked_vector({}, *this);
|
||||
m_heap->did_create_root_vector({}, *this);
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue