Tidy GC allocation paths in preparation for adding a nursery fast path
Categories
(Core :: JavaScript: GC, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox114 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
(Whiteboard: [sp3])
Attachments
(6 files)
The GC allocation code is quite complicated. I wrote some patches to tidy it up and make it more consistent between the different allocation kinds.
Assignee | ||
Comment 1•2 years ago
|
||
Currently we call both the TenuredCell consturctor and the derived constructor
for tenured allocations. While this is not illegal, it's strange and we should
rely on the derived constructor.
The patch changes the tenured allocation paths to use void* pointers to
unconstructed memory.
I don't know why the change to cell header initialization was necessary. It
seems the TenuredCell constructor initialized the header to zero for some
reason, but I don't see why it should have.
Assignee | ||
Comment 2•2 years ago
|
||
This moves the dynamic slot allocation code that is currently duplicated
between nursery and tenured allocation paths into NativeObject instead.
Depends on D175372
Assignee | ||
Comment 3•2 years ago
|
||
Previously we didn't call any constructor for nursery-allocated objects, and we
always called the JSObject constructor for tenured objects. This makes object
constructor more like the other paths and calls the constructor in one place at
the end.
Depends on D175373
Assignee | ||
Comment 4•2 years ago
|
||
Depends on D175374
Assignee | ||
Comment 5•2 years ago
|
||
Depends on D175376
Assignee | ||
Comment 6•2 years ago
|
||
This is just so you don't have to include both Cell.h and Allocator.h to
declare a derived cell type.
Depends on D175378
Comment 8•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e8cfac05da4a
https://hg.mozilla.org/mozilla-central/rev/cd8376894002
https://hg.mozilla.org/mozilla-central/rev/684d845a4a42
https://hg.mozilla.org/mozilla-central/rev/00cf9f71c60e
https://hg.mozilla.org/mozilla-central/rev/e8e565d555fa
https://hg.mozilla.org/mozilla-central/rev/34ed400b7bb1
https://hg.mozilla.org/mozilla-central/rev/179b8c4df1ad
Updated•2 years ago
|
Updated•2 years ago
|
Description
•