Closed Bug 1692517 Opened 3 years ago Closed 3 years ago

Re-add inlining support for TypedArray, DataView, and RegExp getters

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(10 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

With the Warp transition, we lost inlining support for:

Inlinig support for byteOffset was lost in the Ion -> Warp transition.

This CacheIR op is needed when inlining byteOffset and byteLength getters
for DataViews.

Depends on D105176

Renames the TypedArrayByteOffset{Int32,Double}Result CacheIR op to
ArrayBufferViewByteOffset{Int32,Double}Result which matches the names in the
MacroAssembler and MArrayBufferViewByteOffset.

And apply the same changes for LoadTypedArrayLength{Int32,Double}Result.

Depends on D105177

Similar to part 1, re-add inlining support for the byteOffset getter on
DataViews.

Depends on D105178

Similar to part 4, re-add inlining support for the byteLength getter on
DataViews.

Depends on D105179

And for completeness also inline the byteLength getter on TypedArrays.

Depends on D105180

We have in-tree code which uses the ArrayBuffer's byteLength as the loop bound,
so if we take that as an indication that code elsewhere is also using this
pattern, we might as well provide an optimisation for it.

Depends on D105181

For Warp this reuses the same approach we had in Ion to convert the flag to a
boolean, i.e. MBitAnd with a constant and then two MNot to convert the
int32 to a boolean.

Depends on D105182

Prefer MUL over SMULL when possible.

Depends on D105180

Add MacroAssembler::mulPtr(Register, Register) to the other architectures,
so it can be used in the next part.

Depends on D105293

Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/d2692464768a
Part 1: Inline TypedArray byteOffset getter. r=jandem
https://hg.mozilla.org/integration/autoland/rev/3e86cc271732
Part 2: Add GuardHasAttachedArrayBuffer CacheIR op. r=jandem
https://hg.mozilla.org/integration/autoland/rev/25bee0174a3f
Part 3: Rename TypedArray CacheIR ops to use "ArrayBufferView". r=jandem
https://hg.mozilla.org/integration/autoland/rev/0e78470a1aa5
Part 4: Inline DataView byteOffset getter. r=jandem
https://hg.mozilla.org/integration/autoland/rev/b2e8421f03f1
Part 5: Inline DataView byteLength getter. r=jandem
https://hg.mozilla.org/integration/autoland/rev/6da9c4965eb7
Part 6.1: Use 32-bit multiplication on ARM64 when possible. r=jandem
https://hg.mozilla.org/integration/autoland/rev/4d52617aeac6
Part 6.2: Add "MacroAssembler::mulPtr(Register, Register)". r=jandem
https://hg.mozilla.org/integration/autoland/rev/053e917251a7
Part 6: Inline TypedArray byteLength getter. r=jandem
https://hg.mozilla.org/integration/autoland/rev/8b875ea0c3a2
Part 7: Inline byteLength getter for (Shared)ArrayBuffer. r=jandem
https://hg.mozilla.org/integration/autoland/rev/496d15736f5e
Part 8: Inline RegExp flags getters. r=jandem
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: