Closed Bug 1819558 Opened 1 year ago Closed 1 year ago

Optimize constructor calls to bound functions in CacheIR

Categories

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

task

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(3 files)

The new implementation that landed in bug 1483869 doesn't optimize this yet. Constructor calls are not common in Speedometer for example, but this might regress other workloads and this cliff is relatively easy to fix.

We have to guard on the bound function's is-constructor flag, but other than that
it's the same as invoking other construct hooks.

This factors out emitCallScriptedGuards and CanOptimizeScriptedCall helper functions
that bound-scripted and unbound-scripted calls can share. Also adds a newTarget
argument to getThisShapeForScripted to prepare for the next patch.

Depends on D171329

Blocks: 1819486
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2db84bed24d6
part 1 - Support bound constructors in tryAttachCallHook. r=iain
https://hg.mozilla.org/integration/autoland/rev/260ee9be2402
part 2 - Refactor scripted call code to allow sharing more of it. r=iain
https://hg.mozilla.org/integration/autoland/rev/f04c5bdd5599
part 3 - Optimize bound-scripted constructor calls. r=iain
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
Whiteboard: [sp3]
Blocks: 1355096
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: