Closed Bug 1522051 Opened 7 months ago Closed 7 months ago

Consider not giving singleton types to call objects

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

This optimization was added in bug 864218 to optimize asm.js-like code in Ion. It's time to revisit this:

  • WebAssembly happened and there's a lot going on there. As a result we've been focusing more on page load than on hot loop performance.

  • It complicates the interpreter work I'm doing because JSOP_SETALIASEDVAR can't do the fast thing on singleton call objects and needs to fall back to an IC.

  • JSOP_SETALIASEDVAR and JSOP_INITALIASEDLEXICAL are currently marked as JOF_IC so they always get a SetProp IC allocated for them.

  • There's a lot of complexity (a patch for this removes about 500 lines of code).

  • It doesn't seem to help Speedometer, Octane, other benchmarks.

This optimization was added in bug 864218 to optimize asm.js-like code in Ion.

We're removing it now because:

  • WebAssembly happened and we've been focusing more on page load than on hot
    loop performance.

  • It complicates the interpreter work because JSOP_SETALIASEDVAR can't do the
    fast thing on singleton call objects and needs to fall back to an IC.

  • JSOP_SETALIASEDVAR and JSOP_INITALIASEDLEXICAL are currently marked as JOF_IC
    so they always get a SetProp IC allocated for them. With this patch that no
    longer happens.

  • The patch removes a lot of complexity.

  • It doesn't seem to affect Speedometer, Octane, other benchmarks.

Note that this also removes the EnvironmentCoordinateNameCache because
EnvironmentCoordinateName is now only called in debug-only or error-handling
code. I renamed it to EnvironmentCoordinateNameSlow to emphasize this.

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7259ee92e345
Stop giving singleton types to call objects. r=tcampbell
Priority: -- → P1
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.