Refactor XDRScript to better align with current JSScript struct
Categories
(Core :: JavaScript Engine, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
Details
Attachments
(9 files)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
nbp
:
feedback+
|
Details |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
js::XDRScript has envolved over the years into a complex mess as JSScript has changed. With Bug 1485347 cleaning up a lot of stuff in the data structure, it makes sense to apply a similar structure to XDRScript (and later CopyScript).
The motivation is to make XDR more robust and make it easy to change JSScript for content-overhead and generated-interpreter projects.
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
Depends on D19005
Assignee | ||
Comment 3•6 years ago
|
||
Also change JSTryNote::kind to uint32_t to absorb alignment padding of
structure.
Depends on D19006
Assignee | ||
Comment 4•6 years ago
|
||
Depends on D19007
Assignee | ||
Comment 5•6 years ago
|
||
Depends on D19008
Assignee | ||
Comment 6•6 years ago
|
||
Depends on D19009
Assignee | ||
Comment 7•6 years ago
|
||
Comment on attachment 9042185 [details]
Bug 1525924 - Part 6: Factor out PrivateScriptData::XDR
Nicolas, I'm rewriting XDRScript in this stack to better match our data structures. Any major objections or strong desire to review? Otherwise I've reviewed a lot of Jan's recent JSScript changes so I'll make him review these tedious cleanups.
Assignee | ||
Comment 8•6 years ago
|
||
Comment on attachment 9042185 [details]
Bug 1525924 - Part 6: Factor out PrivateScriptData::XDR
(It works better when I include people's names... )
See Comment 7.
Assignee | ||
Comment 9•6 years ago
|
||
Make the method static so that in a follow-up the allocation of the
object can be absorbed in the method.
Assignee | ||
Comment 10•6 years ago
|
||
This moves the allocation of the ScriptSource object into
ScriptSource::XDR instead of being done in the caller. A
MutableHandle<ScriptSourceHolder> is used to manage both
ScriptSource::refCount as well as tracing Atoms from BinAST.
Depends on D19163
Assignee | ||
Comment 11•6 years ago
|
||
This makes XDRScript better follow the field layout of JSScript.
Assignee | ||
Comment 12•6 years ago
|
||
This series of changes cleans up XDRScript to a lot more organized and much better aligned with the current data structures. The next set of changes (in another bug) will probably change XDRScript/CopyScript/JSScript/etc at the same time to clarify initialization sequences to be less error-prone.
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
Comment on attachment 9042185 [details]
Bug 1525924 - Part 6: Factor out PrivateScriptData::XDR
Nice refactoring! This would also make things easier to understand.
Comment 15•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/34b6c82e60ce
https://hg.mozilla.org/mozilla-central/rev/582ab25b0a61
https://hg.mozilla.org/mozilla-central/rev/496594078fd3
https://hg.mozilla.org/mozilla-central/rev/8045fef98288
https://hg.mozilla.org/mozilla-central/rev/3dde34aa913c
https://hg.mozilla.org/mozilla-central/rev/99c5523b079b
https://hg.mozilla.org/mozilla-central/rev/294323a1a8e6
https://hg.mozilla.org/mozilla-central/rev/634ba2074e16
https://hg.mozilla.org/mozilla-central/rev/df6a7d40a383
Description
•