Optimize reserved slot accesses
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(3 files)
After removing private slots in bug 1719457, we can optimize gets/sets of reserved slots by relying on the fact that fixed slots are used for them (up to the maximum number of fixed slots).
This means we no longer need to read obj->shape->numFixedSlots
when getting/setting reserved slots and can optimize a slot access with constant index (the common case) to a single memory load/store.
Unfortunately doing the same for the JS::GetReservedSlot
and JS::SetReservedSlot
APIs is more complicated because these can also be used for proxies.
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
After removing private slots, we can optimize gets/sets of reserved slots by
relying on the fact that fixed slots are used for them (up to the maximum number
of fixed slots).
This means we no longer need to read obj->shape->numFixedSlots when getting/setting
reserved slots and can optimize a slot access with constant index (the common case)
to a single memory load/store.
Unfortunately doing the same for the JS::GetReservedSlot and JS::SetReservedSlot
APIs is more complicated because these can also be used for proxies and swappable
DOM objects.
Depends on D121355
Assignee | ||
Comment 3•3 years ago
|
||
Depends on D121356
Comment 5•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/54dc60004dcf
https://hg.mozilla.org/mozilla-central/rev/dfd6d7623515
https://hg.mozilla.org/mozilla-central/rev/62aa961c1bd7
Description
•