Re-add inlining support for TypedArray, DataView, and RegExp getters
Categories
(Core :: JavaScript Engine: JIT, enhancement)
Tracking
()
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:
- TypedArray
byteOffset
getter (bug 1526403) - DataView
byteOffset
andbyteLength
getters (bug 1065894) - RegExp flags getters (bug 1246575)
Assignee | ||
Comment 1•3 years ago
|
||
Inlinig support for byteOffset
was lost in the Ion -> Warp transition.
Assignee | ||
Comment 2•3 years ago
|
||
This CacheIR op is needed when inlining byteOffset
and byteLength
getters
for DataViews.
Depends on D105176
Assignee | ||
Comment 3•3 years ago
|
||
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
Assignee | ||
Comment 4•3 years ago
|
||
Similar to part 1, re-add inlining support for the byteOffset
getter on
DataViews.
Depends on D105178
Assignee | ||
Comment 5•3 years ago
|
||
Similar to part 4, re-add inlining support for the byteLength
getter on
DataViews.
Depends on D105179
Assignee | ||
Comment 6•3 years ago
|
||
And for completeness also inline the byteLength
getter on TypedArrays.
Depends on D105180
Assignee | ||
Comment 7•3 years ago
|
||
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
Assignee | ||
Comment 8•3 years ago
|
||
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
Assignee | ||
Comment 9•3 years ago
|
||
Prefer MUL
over SMULL
when possible.
Depends on D105180
Assignee | ||
Comment 10•3 years ago
|
||
Add MacroAssembler::mulPtr(Register, Register)
to the other architectures,
so it can be used in the next part.
Depends on D105293
Comment 11•3 years ago
|
||
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
Comment 12•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d2692464768a
https://hg.mozilla.org/mozilla-central/rev/3e86cc271732
https://hg.mozilla.org/mozilla-central/rev/25bee0174a3f
https://hg.mozilla.org/mozilla-central/rev/0e78470a1aa5
https://hg.mozilla.org/mozilla-central/rev/b2e8421f03f1
https://hg.mozilla.org/mozilla-central/rev/6da9c4965eb7
https://hg.mozilla.org/mozilla-central/rev/4d52617aeac6
https://hg.mozilla.org/mozilla-central/rev/053e917251a7
https://hg.mozilla.org/mozilla-central/rev/8b875ea0c3a2
https://hg.mozilla.org/mozilla-central/rev/496d15736f5e
Description
•