Closed Bug 1657088 Opened 2 months ago Closed 2 months ago

Warp: Optimize code emitted for a simple for-of loop

Categories

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

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: evilpie, Assigned: evilpie)

References

(Blocks 1 open bug)

Details

Attachments

(5 files, 1 obsolete file)

There are various problems with for-of as compiled by Warp. Probably most importantly we weren't even inlining the JSOp::CallIter call to Array.prototype.[Symbol.iterator]. I think with a bit of work I could even get the scalar replacement for the iterator object working. I want to do this last to not miss some other optimizations.

Assignee: nobody → evilpies
Blocks: WarpBuilder

Depends on D85870

This is useful for scalar replacement / escape analysis, because otherwise
we would have to handle that case there, too.

Depends on D85872

Attached file for-of testcase
Attachment #9167907 - Attachment is obsolete: true
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/3e1d47384b4d
Do inlining for JSOp::CallIter. r=iain
https://hg.mozilla.org/integration/autoland/rev/d3c031931b96
Change MCheckIsObject to return an Object. r=jandem
https://hg.mozilla.org/integration/autoland/rev/ca8852a5f555
Folding for MIsObject and MCheckIsObj. r=jandem
https://hg.mozilla.org/integration/autoland/rev/30945c9bef85
Optimize CheckIsObj in WarpBuilder for known objects. r=jandem
Severity: -- → N/A
Status: NEW → ASSIGNED
Priority: -- → P1
You need to log in before you can comment on or make changes to this bug.