Optimise Array.prototype.slice on arguments objects
Categories
(Core :: JavaScript Engine: JIT, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox101 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
Details
Attachments
(7 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 |
A while ago I was checking when we fail to scalar replace the arguments object. I found two common code patterns:
super(...arguments)(bug 1740737)Array.prototype.slice.call(arguments)
Optimising Array.prototype.slice.call(arguments) was blocked on bug 1738413, so now we can finally tackle this issue.
| Assignee | ||
Comment 1•3 years ago
|
||
The next patches will add Warp and scalar replacement support. The tests are based
on the existing arguments objects tests and cover the following cases:
- begin and end index are both missing,
- begin index is positive,
- begin index is negative,
- begin and end index are both present.
| Assignee | ||
Comment 2•3 years ago
|
||
Transpile "ArgumentsSliceResult" similar to how "PackedArraySliceResult" is
optimised.
Depends on D144041
| Assignee | ||
Comment 3•3 years ago
|
||
Adds support to scalar replace MArgumentsSlice for frame arguments. The next
patch will add support for inlined arguments.
Depends on D144042
| Assignee | ||
Comment 4•3 years ago
|
||
Depends on D144043
| Assignee | ||
Comment 5•3 years ago
|
||
This change ensures the MMinMax nodes added in part 3 can be folded away.
Depends on D144044
| Assignee | ||
Comment 6•3 years ago
|
||
There used to be multiple callers to emitRest() (bug 867471), but now
there's only a single caller, so we can inline it again.
Depends on D144047
| Assignee | ||
Comment 7•3 years ago
|
||
This is the case which actually happens in practice and we should aim to
provide support for.
Depends on D144048
Comment 9•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ba4b24512db8
https://hg.mozilla.org/mozilla-central/rev/aeb3d90e0434
https://hg.mozilla.org/mozilla-central/rev/b037127d38f3
https://hg.mozilla.org/mozilla-central/rev/4676e18c3cf0
https://hg.mozilla.org/mozilla-central/rev/1e2bfa74a88e
https://hg.mozilla.org/mozilla-central/rev/257207e109b2
https://hg.mozilla.org/mozilla-central/rev/201252c849f4
Updated•3 years ago
|
Description
•