Closed Bug 1763831 Opened 3 years ago Closed 3 years ago

Improve handling of init-operations in SetPropIRGenerator

Categories

(Core :: JavaScript Engine: JIT, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: anba, Assigned: anba)

References

(Blocks 3 open bugs)

Details

Attachments

(10 files)

(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details

Init-operations (JSOp::Init{Hidden,Locked}(Prop,Elem)) in SetPropIRGenerator sometimes perform additionally work which isn't necessary when defining own properties, for example prototype guards are emitted. Let's improve this!

We don't have to guard the prototype chain when adding an own property.

Non-native objects were previously indirectly filtered through LookupOwnPropertyPure.

Depends on D143293

This change allows to use the add-slot stub when adding a non-writable
property, for example through InitLockedProp or InitLockedElem.

Depends on D143294

Use LookupOwnPropertyPure instead of HasOwnDataPropertyPure to match
HasPropIRGenerator.

Depends on D143295

This change is no longer needed after bug 1547129.

Drive-by change:

  • Change InitPropertyOperation() to accept jsbytecode* for consistency with
    InitElemOperation().

Depends on D143296

Add extra assertions in preparation for part 9.

Depends on D143297

More assertions in preparation for part 9.

Depends on D143298

This allows to attach InitHiddenProp and InitHiddenElem when the property is non-enumerable.

Depends on D143299

Parts 6-7 added assertions that init-prop operations aren't used in unsupported
contexts. Part 8 changed CanAttachNativeSetSlot to check for the correct
enumerable property attribute.

These changes allow to enable attaching stubs for JSOp::InitHiddenElem.

Depends on D143300

There isn't any good reason to disallow InitLockedElem ICs in Warp.

Depends on D143301

Severity: -- → N/A
Priority: -- → P1
Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/4b8bdd2cad0d Part 1: Don't guard on prototype shapes when emitting an init-prop operation. r=iain https://hg.mozilla.org/integration/autoland/rev/e2ced4199c4b Part 2: Return early for non-native objects in canAttachAddSlotStub(). r=iain https://hg.mozilla.org/integration/autoland/rev/d623bd962693 Part 3: Check exact flags when attaching an add-slot stub. r=iain https://hg.mozilla.org/integration/autoland/rev/588afdafa8a3 Part 4: Allow non-data properties in CheckPrivateFieldIRGenerator. r=iain https://hg.mozilla.org/integration/autoland/rev/510c4b98453e Part 5: Directly call InitPropertyOperation in IonIC for IsPropertyInitOp. r=iain https://hg.mozilla.org/integration/autoland/rev/f8a167e3f8b6 Part 6: Add extra assertions when only IsPropertySetOp is supported. r=iain https://hg.mozilla.org/integration/autoland/rev/6f6d0baf8a17 Part 7: Add extra assertions for dense and typed array properties. r=iain https://hg.mozilla.org/integration/autoland/rev/931a78c9c710 Part 8: Check for exact property attributes in LookupShapeForSetSlot. r=iain https://hg.mozilla.org/integration/autoland/rev/5f6ff39a2a62 Part 9: Remove no longer needed JSOp::InitHiddenElem restriction. r=iain https://hg.mozilla.org/integration/autoland/rev/52c9b0b48530 Part 10: Enable InitLockedElem IC in Warp. r=iain
No longer regressions: 1776356
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: