Closed Bug 1762584 Opened 2 years ago Closed 2 years ago

Store private brand as a data-property

Categories

(Core :: JavaScript Engine, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox100 --- wontfix
firefox101 --- fixed

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.

The previous accessor property based solution no longer applies after bug 1700052.

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
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: