Store private brand as a data-property
Categories
(Core :: JavaScript Engine, enhancement)
Tracking
()
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(2 files)
The current private brand implementation uses an accessor property to save a slot. This optimisation no longer applies after bug 1700052, because accessor properties are now also stored in slots.
Using a data property for the private brand allows to use the existing optimisations for initialising data properties, which makes initialising classes which use a private brand significantly faster.
Assignee | ||
Comment 1•2 years ago
|
||
The previous accessor property based solution no longer applies after bug 1700052.
Assignee | ||
Comment 2•2 years ago
|
||
Private brands can't be installed multiple times in non-derived class
constructors, so we can omit this check in base class constructors. This check
can already be optimised away in Warp, so this only saves a bit of bytecode
size.
Depends on D142676
Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/8dbbf5328ef3 Part 1: Store private brand in a data-property. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/44bdb3be6aa9 Part 2: Don't emit private-brand reinit checks for non-derived class constructors. r=mgaudet
Comment 4•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8dbbf5328ef3
https://hg.mozilla.org/mozilla-central/rev/44bdb3be6aa9
Updated•2 years ago
|
Description
•