Closed Bug 1658811 Opened 4 years ago Closed 4 years ago

Warp: Transpile Function.prototype.apply arguments optimization

Categories

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

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: iain, Assigned: iain)

References

Details

Attachments

(6 files)

These patches implement FunApplyArgs. I'll do FunApplyArray in a separate bug.

  1. tryAttachFunApply was the last remaining use of GuardSpecificNativeFunction.
  2. The FunApplyArgs side of GuardFunApply can be reimplemented using existing CacheIR ops. We might be able to do a similar thing with GuardFunApplyArray, but it will require a bit of refactoring, so I'm leaving it as its own op for now.
  3. Like FunCall, FunApply now has a Specialized variant that guards on the specific target to make inlining easier.

Depends on D86856

GuardFunctionIsConstructor isn't necessary for FunApplyArgs, but it seemed reasonable to implement it now anyway.

Depends on D86857

Depends on D86858

Blocks: 1638111

We didn't have very good jit-test coverage of this code, so I'm also adding a simple testcase.

It appears that the existing limit of 16 args for CacheIR was established when we first added FunApplyArray support in bug 906781 and never revisited.

Depends on D87681

Pushed by iireland@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/85471158d0c5
Clean up tryAttachFunApply r=jandem
https://hg.mozilla.org/integration/autoland/rev/9e22306cf2a2
Transpile GuardNotClassConstructor r=jandem
https://hg.mozilla.org/integration/autoland/rev/f359af39ebfa
Transpile function flag guards r=jandem
https://hg.mozilla.org/integration/autoland/rev/a0457890d336
Transpile FunApplyArgs r=jandem
https://hg.mozilla.org/integration/autoland/rev/0a552e8d736a
Use the correct arguments when transpiling inside an inlined function r=jandem
https://hg.mozilla.org/integration/autoland/rev/49ad63d4238d
Unify funapply/spread args limits between CacheIR and MIR r=jandem
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: