Closed Bug 1658279 Opened 6 months ago Closed 5 months ago

Optimise ArraySlice in CacheIR and Warp

Categories

(Core :: JavaScript Engine: JIT, task)

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: anba, Assigned: anba)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

No description provided.

Optimise Array.prototype.slice for packed arrays in CacheIR and Warp. Ion
also optimises slice() for non-packed arrays, but unless non-packed arrays
actually appear in user code, only optimising packed arrays should be okay
for now.

The second argument to slice() defaults to the array length, which means
we need a non-result version of LoadInt32ArrayLength.

Drive-by change:

  • Move IonCacheIRCompiler::emitArrayPush to the bottom of the file,
    next to the other non-implemented methods. Also change from
    MOZ_ASSERT_UNREACHABLE to MOZ_CRASH for consistency.

Noticed while working on ArraySlice that ArrayPush and ArrayJoin have
unnecessary rooting. Also found some other places where rooting can
be omitted.

Depends on D86532

Calling String() shouldn't create a template object.

Depends on D86533

Pushed by rmaries@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/25869d8b6148
Part 1: Optimise ArraySlice in CacheIR and Warp. r=jandem
https://hg.mozilla.org/integration/autoland/rev/761efef13026
Part 2: Remove unnecessary rooting in CacheIR. r=jandem
https://hg.mozilla.org/integration/autoland/rev/728d98643858
Part 3: Don't create a template object for String when not constructing. r=jandem
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/75d3ba32d90a
Part 1: Optimise ArraySlice in CacheIR and Warp. r=jandem
https://hg.mozilla.org/integration/autoland/rev/5e227e32ff86
Part 2: Remove unnecessary rooting in CacheIR. r=jandem
https://hg.mozilla.org/integration/autoland/rev/37746b10f75c
Part 3: Don't create a template object for String when not constructing. r=jandem
Flags: needinfo?(andrebargull)
You need to log in before you can comment on or make changes to this bug.