mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
LibJS: Remove "uprooting" mechanism from garbage collector
The Heap::uproot_cell() API was used to implement markAsGarbage() which was used in 3 tests to forcibly destroy a value, even if it had references on the stack or elsewhere. This patch rewrites the 3 tests that used this mechanism to be structured in a way that allows garbage collection to collect the values as intended without hacks. And now that the uprooting mechanism is no longer needed, it's uprooted as well. This fixes 3 test-js tests in bytecode mode. :^)
This commit is contained in:
parent
9054b1bc14
commit
6232ad3a0d
6 changed files with 28 additions and 65 deletions
|
@ -76,8 +76,6 @@ public:
|
|||
|
||||
BlockAllocator& block_allocator() { return m_block_allocator; }
|
||||
|
||||
void uproot_cell(Cell* cell);
|
||||
|
||||
private:
|
||||
static bool cell_must_survive_garbage_collection(Cell const&);
|
||||
|
||||
|
@ -112,8 +110,6 @@ private:
|
|||
MarkedVectorBase::List m_marked_vectors;
|
||||
WeakContainer::List m_weak_containers;
|
||||
|
||||
Vector<GCPtr<Cell>> m_uprooted_cells;
|
||||
|
||||
BlockAllocator m_block_allocator;
|
||||
|
||||
size_t m_gc_deferrals { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue