Consider storing an object's dynamic slot count directly in a header
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(4 files)
Jan suggested that we might store the number of dynamic slots in a header like we do for object elements.
Currently it's quite involved working this out (see NativeObject::numDynamicSlots, NativeObject::dynamicSlotsCount, NativeObject::slotSpan) and touches the class, the shape and possibly the base shape.
Updated•5 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 1•4 years ago
|
||
I wonder if the new field could eventually replace BaseShape::slotSpan_
, so the slot span would always be stored in obj->slots->slotSpan
, for both dictionary and non-dictionary native objects... For that to work we'd need statically-allocated empty-dynamic-slots structs for slot span 0-16, similar to EmptyObjectElements.
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D87596
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
As suggested, this uses special shared header objects if there are no dynamic slots.
Depends on D87597
Assignee | ||
Comment 5•4 years ago
|
||
This also shrinks BaseShape down to 16 bytes on 32 bit platforms.
Depends on D87888
Updated•4 years ago
|
Comment 7•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9eb95eed348c
https://hg.mozilla.org/mozilla-central/rev/d00c06a25def
https://hg.mozilla.org/mozilla-central/rev/a1ede76c8e1c
https://hg.mozilla.org/mozilla-central/rev/1f3b9d75281c
Description
•