Closed Bug 1662688 Opened 4 years ago Closed 4 years ago

Warp: support specialized calls and inlining of lambda clones

Categories

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

task

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(6 files, 1 obsolete file)

The GuardSpecificFunction instruction doesn't work well when there are function clones. I have a patch that adds GuardFunctionScript to guard on the script instead of the function.

We want GuardFunctionScript to compare the JSFunction field without any flag checks
but that only works if native functions are guaranteed to not have an identical value
stored there.

Because guarding on the Class and the BaseScript is quite a bit slower than
GuardSpecificFunction, try the function guard if we're attaching the first stub.

Make trial inlining ignore the unused stub so we can still inline. This is similar
to the heuristics WarpOracle uses but is still a bit more conservative.

Depends on D89139

This matches what we do for the main script in IonCompile and could prevent problems
with nursery-allocated functions.

Depends on D89140

This fixes an issue where we could inline twice at the same pc, confusing the
bailout code.

Attachment #9173633 - Attachment is obsolete: true
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d0870e9a8b74 part 1 - Ensure native functions never have a valid BaseScript* in the 'extra' field. r=iain https://hg.mozilla.org/integration/autoland/rev/166f59b3f3b0 part 2 - Add support for BaseScript stub fields. r=iain https://hg.mozilla.org/integration/autoland/rev/060f7da5ba7e part 3 - Add GuardFunctionScript CacheIR and MIR instructions. r=iain https://hg.mozilla.org/integration/autoland/rev/02d37579be32 part 4 - Support GuardFunctionScript in call specialization and trial inlining code. r=iain https://hg.mozilla.org/integration/autoland/rev/a6f52a53ea98 part 5 - Emit GuardFunctionScript for scripted functions. r=iain https://hg.mozilla.org/integration/autoland/rev/2d9a913e6f1f part 6 - Check for previously-inlined ICScripts. r=iain
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: