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•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Comment 1•3 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•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
Depends on D87596
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
As suggested, this uses special shared header objects if there are no dynamic slots.
Depends on D87597
Assignee | ||
Comment 5•3 years ago
|
||
This also shrinks BaseShape down to 16 bytes on 32 bit platforms.
Depends on D87888
Updated•3 years ago
|
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9eb95eed348c Part 1: Use a header for dynamic object slots and use it to store the capacity r=jandem https://hg.mozilla.org/integration/autoland/rev/d00c06a25def Part 2: Use the stored capacity for NativeObject::numDynamicSlots() r=jandem https://hg.mozilla.org/integration/autoland/rev/a1ede76c8e1c Part 3: Store dictionary object slot span in the slots header r=jandem https://hg.mozilla.org/integration/autoland/rev/1f3b9d75281c Part 4: Removed the unused slotSpan field from BaseShape r=jandem
Comment 7•3 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
•