Closed Bug 1863543 Opened 5 months ago Closed 3 months ago

Optimize CacheIR for missing properties on DOM proxies

Categories

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

task

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(3 files)

See bug 1863454 comment 1.

In GetPropIRGenerator::tryAttachDOMProxyUnshadowed we currently emit a proxy-get call for missing properties, but we can emit some shape guards for the proto chain and then return undefined.

I'm not sure if this will be sufficient for the polymorphic case in that bug, but this stub does hit at least 30,000 times on Speedometer 3 so this seems worth optimizing as a first step.

We were optimizing this when we found the property on the proto chain, but
if the property was missing we were emitting a slow VM call. We can optimize
this in a similar way.

Depends on D192955

Blocks: sm-jits
Severity: -- → N/A
Priority: -- → P1
Depends on: 1863714
Whiteboard: [sp3]

There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:jandem, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(jdemooij)
Flags: needinfo?(iireland)
Flags: needinfo?(iireland)
Attachment #9362364 - Attachment description: Bug 1863543 part 1 - Improve comment and code for CacheIR DOM proxy guards. r?iain! → Bug 1863543 part 1 - Improve comment and code for CacheIR DOM proxy guards. r?iain!,peterv!
Attachment #9362365 - Attachment description: Bug 1863543 part 2 - Optimize CacheIR for missing properties on DOM proxies. r?iain! → Bug 1863543 part 2 - Optimize CacheIR for missing properties on DOM proxies. r?iain!,peterv!
Flags: needinfo?(jdemooij)

The test_private_field_dom.html test was failing with the previous patch, because
we were incorrectly optimizing a private field access as a missing-property.

Depends on D192956

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/096d5dd557c0
part 1 - Improve comment and code for CacheIR DOM proxy guards. r=iain,peterv
https://hg.mozilla.org/integration/autoland/rev/2d3e18108992
part 2 - Optimize CacheIR for missing properties on DOM proxies. r=iain,peterv
https://hg.mozilla.org/integration/autoland/rev/07d3face1a12
part 3 - Don't optimize private field accesses on DOM proxies. r=mgaudet
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch

High probability that this bug (or low probability bug 1843499) led to these improvements:

33% on splay-Worst
9% improvement on AWFY-Jetstream2-splay-Average

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: