Remove object private slots
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(1 file)
Native objects can have a private slot via JSCLASS_HAS_PRIVATE
, but most of the objects using this can be easily converted to use a reserved slot instead. Reserved slots are strictly more powerful because there can be multiple slots.
Private slots complicate and slow down the object allocation code and it's another obscure thing to think about when making changes.
There's some complexity around JSCLASS_PRIVATE_IS_NSISUPPORTS
but I hope we can find a solution for that.
Assignee | ||
Comment 1•3 years ago
|
||
Initially the only way to attach data to an object was with a private slot.
More than 21 years ago (bug 73843) support for reserved slots was added
to the engine. An object can have multiple reserved slots, which makes
reserved slots more powerful and useful than the old-style private slot.
After converting the remaining private slots to reserved slots, we can now finally
remove support for private slots.
There's a bit more optimization work we can do to reserved slot accesses after
this lands.
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ba6511f2bc3e Remove support for JSObject private slots. r=jonco
Comment 3•3 years ago
|
||
bugherder |
Description
•