Closed Bug 1500514 Opened 6 years ago Closed 3 years ago

Make IonMonkey fun.call/apply work more like inlining

Categories

(Core :: JavaScript Engine: JIT, enhancement, P3)

enhancement

Tracking

()

RESOLVED INVALID

People

(Reporter: tcampbell, Unassigned)

References

Details

We currently do magic stack/resumepoint management for JSOP_FUNCALL / JSOP_FUNAPPLY and cause headaches and bugs. I'm proposing we try and make it instead as similar to inlining as we can. This would probably including using IonBuilder::buildInline and generating proper inline stack frames. Ideally we'd still end up with optimal code but simplify Ion in the process. :nbp has some ideas here as well.
The idea that I have, is that, even if this cost us 2 empty MBasicBlocks with resume points, we should make a proper entry and exit block, with the proper resume points which are shuffling the arguments around.

 - When iterating over the JitInlinedFrames, we would no longer have to do some crazy logic to recover the arguments order, or the JSFunction based on which kind of JSOP the pc corresponds to.

 - When doing a bailout, we could skip these special frames reconstructions.

(Fix by WarpBuilder)

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.