Closed Bug 1353358 Opened 8 years ago Closed 8 years ago

Support JSOP_OPTIMIZE_SPREADCALL in Ion

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

This is a follow-up to bug 1338920. When we see spreadcalls in source that have a single expanded array, we sometimes try to optimize this by voiding intermediate arguments array construction. See |BytecodeEmitter::emitOptimizeSpread|. We would like to support this in Ion. The current problem is that IonControlFlow does not recognize the branch pattern emitted into the bytecode and asserts out.
Assignee: nobody → tcampbell
Blocks: ares-6, es6perf
Likely approach will be to ensure we emit proper SrcNotes for the emitOptimizeSpread case and try to make it behave like a normal If-Then branch.
Priority: -- → P3
Attachment #8859683 - Flags: review?(jdemooij)
Attachment #8859684 - Flags: review?(jdemooij)
Comment on attachment 8859683 [details] Bug 1353358 - Use IfThenElseEmitter when optimizing spreadcall https://reviewboard.mozilla.org/r/131694/#review135208 Nice
Attachment #8859683 - Flags: review?(jdemooij) → review+
Comment on attachment 8859684 [details] Bug 1353358 - Support JSOP_OPTIMIZE_SPREADCALL in Ion https://reviewboard.mozilla.org/r/131696/#review135212 ::: js/src/jit/IonBuilder.cpp:2328 (Diff revision 1) > return Ok(); > > + case JSOP_OPTIMIZE_SPREADCALL: > + { > + // Assuming optimization isn't available doesn't affect correctness. > + // TODO: Investigate dynamic checks. Please file a follow-up bug. We could check the shape of Array.prototype etc and branch to the slow path if it changed.
Attachment #8859684 - Flags: review?(jdemooij) → review+
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fd25c2c275fc Use IfThenElseEmitter when optimizing spreadcall r=jandem https://hg.mozilla.org/integration/autoland/rev/077dfe082524 Support JSOP_OPTIMIZE_SPREADCALL in Ion r=jandem
Follow-up Bug 1358501
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: