Minimize remaining uses XDR outside of StencilXDR code
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
(Blocks 1 open bug)
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 |
Now that legacy-XDR is fully removed, there is more cleanup that can be down to remove uses of Xdr.h in various parts of the engine and better organize the code. We previously introduced the StencilXDR type to act as a namespace for the serialization code and avoid any Stencil types from being directly aware of XDR.
Assignee | ||
Comment 1•2 years ago
|
||
With the removal of BinAST and the addition of Stencil, the ScriptSource no
longer has any GC references in the incremental-encoder. We can now remove the
early cleanup and rely on the normal ScriptSource destructor, even if this
happens off-main-thread.
Assignee | ||
Comment 2•2 years ago
|
||
Use the deserializeStencils
API for the ScriptDecodeTask to avoid needing to
used the XDR decoder directly.
Depends on D132424
Assignee | ||
Comment 3•2 years ago
|
||
Remove a few methods that were forgotten when we removed "legacy" XDR in favour
of only StencilXDR. Also use deserializeStencils
helper instead of directly
using the XDRStencilDecoder to reduce coupling.
Depends on D132425
Assignee | ||
Comment 4•2 years ago
|
||
Later patches will move the methods from ScriptSource type to the StencilXDR to
reduce coupling with XDR internal functions.
Move the SourceRetrievable definition to a shared location. Also change the
value of No
to be falsey to be less surprising even though this is an
enum-class.
Depends on D132426
Assignee | ||
Comment 5•2 years ago
|
||
The StencilXDR class contains the transcoding function for Stencil data types
and so it makes sense for ScriptSource XDR code to move there as well.
Depends on D132427
Assignee | ||
Comment 6•2 years ago
|
||
In order to remove the dependency of JSScript.h on the XDR files, move what was
the XDRIncrementalStencilEncoder to JSScript.h. Since it only contains a single
pointer, remove the UniquePtr<T> around it to avoid a silly indirection.
This also removes a superfluous check for asmjs that is already in the caller.
Also remove the outdated linearize helper.
Depends on D132428
Assignee | ||
Comment 7•2 years ago
|
||
In the future it may make sense to move the rest of Xdr.cpp as well, but for now
we move the most relevant code.
Depends on D132429
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f33f012d62e8 Remove ScriptSource::finalizeGCData. r=arai https://hg.mozilla.org/integration/autoland/rev/15f92ec0c7c9 Avoid using Xdr.h from HelperThreads.cpp r=arai https://hg.mozilla.org/integration/autoland/rev/1217cb018f18 Remove unused XDR code. r=arai https://hg.mozilla.org/integration/autoland/rev/c153c537eb05 Move ScriptSource XDR code from JSScript.cpp to StencilXdr.cpp r=arai https://hg.mozilla.org/integration/autoland/rev/a5a0e0b528a9 Move ScriptSource::XDR methods to the StencilXDR type. r=arai https://hg.mozilla.org/integration/autoland/rev/64cf7017f49f Replace XDRIncrementalStencilEncoder. r=arai https://hg.mozilla.org/integration/autoland/rev/46de2b4b4c8d Move XDRStencilEncoder/Decoder to StencilXdr.h/cpp. r=arai
Comment 9•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f33f012d62e8
https://hg.mozilla.org/mozilla-central/rev/15f92ec0c7c9
https://hg.mozilla.org/mozilla-central/rev/1217cb018f18
https://hg.mozilla.org/mozilla-central/rev/c153c537eb05
https://hg.mozilla.org/mozilla-central/rev/a5a0e0b528a9
https://hg.mozilla.org/mozilla-central/rev/64cf7017f49f
https://hg.mozilla.org/mozilla-central/rev/46de2b4b4c8d
Description
•