Clean-up some TypedArray and ArrayBuffer code in preparation for resizable ArrayBuffers
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox117 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
Details
Attachments
(14 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 | |
|
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 |
Various clean-ups TypedArray and ArrayBuffer code split from a patch stack for resizable ArrayBuffers (bug 1670026), which can be applied independently from the actual resizable ArrayBuffer patches.
| Assignee | ||
Comment 1•2 years ago
|
||
| Assignee | ||
Comment 2•2 years ago
|
||
Depends on D183116
| Assignee | ||
Comment 3•2 years ago
|
||
Depends on D183117
| Assignee | ||
Comment 4•2 years ago
|
||
The TypedArray class pointers are already not publicly visible. Resizable
ArrayBuffers will likely lead to adding different ArrayBuffer/DataView classes,
so there's a possibility there won't actually be a single ArrayBuffer/DataView
class.
Depends on D183118
| Assignee | ||
Comment 5•2 years ago
|
||
Instead of manually initliasing the reserved slots, directly call initialize().
Depends on D183119
| Assignee | ||
Comment 6•2 years ago
|
||
This matches the approach used for ArrayBuffers/SharedArrayBuffers and also
makes adding a separate DataView class for resizable ArrayBuffers easier.
Depends on D183120
| Assignee | ||
Comment 7•2 years ago
|
||
SetFromNonTypedArray is no longer self-hosted.
Depends on D183121
| Assignee | ||
Comment 8•2 years ago
|
||
PossiblyWrappedTypedArrayLength is inlined with CacheOp::GuardIsNotProxy,
which means an additional check for proxies, but MGuardIsNotProxy::foldsTo()
should make sure this extra check is optimised away.
Depends on D183122
| Assignee | ||
Comment 9•2 years ago
|
||
ElementSpecific::setFromTypedArray can fail for different type TypedArrays
which use the same buffer, see ElementSpecific::setFromOverlappingTypedArray.
Depends on D183123
| Assignee | ||
Comment 10•2 years ago
|
||
This check was added when the inputs were still uint32_t values. It can no
longer fail with the current types, so we can replace the runtime check with
an assertion.
Depends on D183124
| Assignee | ||
Comment 11•2 years ago
|
||
Deallocation no longer reads SharedArrayRawBuffer::length_, which makes this
assertion unnecessary resp. its corresponding commment confusing.
Depends on D183125
| Assignee | ||
Comment 12•2 years ago
|
||
Similar to the patches from bug 1773368.
Depends on D183126
| Assignee | ||
Comment 13•2 years ago
|
||
Depends on D183127
| Assignee | ||
Comment 14•2 years ago
|
||
Similar to part 2, CreateWasmBuffer can also be changed to directly return a
pointer value.
Depends on D183128
Updated•2 years ago
|
Comment 15•2 years ago
|
||
Comment 16•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/8392f3e71013
https://hg.mozilla.org/mozilla-central/rev/b638d6f78c72
https://hg.mozilla.org/mozilla-central/rev/fed442d7b21a
https://hg.mozilla.org/mozilla-central/rev/06178554576b
https://hg.mozilla.org/mozilla-central/rev/10e3ba089358
https://hg.mozilla.org/mozilla-central/rev/4adee8eb1a43
https://hg.mozilla.org/mozilla-central/rev/9e4f3967a0cf
https://hg.mozilla.org/mozilla-central/rev/bff4053321d3
https://hg.mozilla.org/mozilla-central/rev/289c376a3cc2
https://hg.mozilla.org/mozilla-central/rev/09514d7d99ae
https://hg.mozilla.org/mozilla-central/rev/096244e162dd
https://hg.mozilla.org/mozilla-central/rev/d10d8b5c0929
https://hg.mozilla.org/mozilla-central/rev/44e07dc07d34
https://hg.mozilla.org/mozilla-central/rev/5878389d049f
Description
•