Closed Bug 1912068 Opened 11 months ago Closed 11 months ago

Refactor GC heap code in prepartion for adding slots/elements allocator

Categories

(Core :: JavaScript: GC, task)

task

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(5 files)

This bug is for a bunch of refactoring patches written in preparation for bug 1911537.

gc/Heap-inl.h contains definitions that should be internal to the GC. This
change removes the need to inlude it in vm/NativeObject-inl.h which greatly
reduces the places it is included from.

Assignee: nobody → jcoppeard
Status: NEW → ASSIGNED

Currently we have two different definitons for several methods that check mark
bits, one set being in the exported HeapAPI.j header and one set in gc/Heap.h.

This patch consolidates on a single definition for the ones that need to be
public and moves the remainder from gc/Heap.h (which gets included everywhere)
to the mostly internal gc/Heap-inl.h.

This also adds a copyFrom method.

This removes an unused parameter from CellAllocator::TryNewTenuredCell and
AllocTenuredCell.

This greatly cuts down the number of files that include this header.

This makes the zone and allocKind fields private and moves some methods that
release arenas into GCRuntime.

The Arena::next field is accessed by a bunch of different classes to put arenas
on various linked lists, so I left this public.

Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7f80ab3f7857 Part 1: Move NativeObject::isInWholeCellBuffer implementation to StoreBuffer r=jandem https://hg.mozilla.org/integration/autoland/rev/2cd958f1b0c3 Part 2: Remove duplicate methods for checking mark bits r=jandem https://hg.mozilla.org/integration/autoland/rev/c0641d30ff1d Part 3: Remove unused size parameter from tenured cell allocation methods r=jandem https://hg.mozilla.org/integration/autoland/rev/99274a339703 Part 4: Remove unnecessary inclusion of gc/Zone.h r=jandem https://hg.mozilla.org/integration/autoland/rev/af34a13f2688 Part 5: Make more Arena fields private r=jandem
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: