Closed Bug 1681272 Opened 4 years ago Closed 4 years ago

Implement JSOp::InitElemArray without ICs

Categories

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

task

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(2 files)

Warp already does this but now that TI is gone we can do the same in Baseline. We can also simplify the C++ interpreter implementation to match the JIT code. This is a pretty big speedup for array literals in the interpreter/Baseline.

These ops are pretty different so it's simpler and more efficient to implement them
separately.

Also optimizes the implementation of InitElemArray (InitElemArrayOperation) to just
initialize the dense element directly. This is a pretty big speedup for the C++
interpreter and matches what Warp code does. The next patch will change the Baseline
implementation to match the C++ code.

This also removes the unused InitElementArray function.

Without TI it's easy to inline this completely, similar to the C++ implementation
and Warp version.

This has separate implementations for Baseline Interpreter and JIT, because the
JIT implementation can be optimized a bit more because the index is a constant and
we know statically whether the value is a hole. We can also eliminate the post-barrier
if the value is a simple constant, which is pretty common for array literals.

This is nice also because it helps mitigate regressions from removing COW-arrays.

Depends on D99068

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c03352e35f50 part 1 - Split InitArrayElemOperation into InitElemArrayOperation and InitElemIncOperation. r=iain https://hg.mozilla.org/integration/autoland/rev/de5572572209 part 2 - Optimize InitElemArray in Baseline without ICs. r=iain
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: