Closed Bug 1661352 Opened 5 years ago Closed 5 years ago

Warp: Transpile FunApplyArray and spread calls

Categories

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

task

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: iain, Assigned: iain)

References

Details

Attachments

(5 files)

Transpiler support for FunApplyArgs was added in bug 1658811. These patches add support for FunApplyArray (and spread calls, which are very similar).

Severity: -- → N/A

Prior to the NON_PACKED flag, we had to iterate over each element of the array to verify that it was packed. It made sense to fold the argc check in with that code. Now that we are using the flag, I moved the argc check inside the call op to match other argument formats.

It's a bit awkward having both MIsPackedArray and MGuardArrayIsPacked, but I didn't see a nicer approach.

Depends on D88510

This makes transpiling nicer, and should also make inlining much easier.

Depends on D88511

CallInfo::ArgFormat::Array supports FunApplyArray (in this patch), SpreadCall (in the next patch), and eventually SpreadNew/SpreadSuperCall.

Depends on D88512

The assertion in emitLoadArgumentSlot was unnecessary. Spread calls always have an argc of 1, so hasArgumentArray and !addArgc cancel each other out in GetIndexOfArgument.

Depends on D88513

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

Attachment

General

Created:
Updated:
Size: