Simplify off-thread stencil APIs
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
(Blocks 1 open bug)
Details
Attachments
(8 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 |
With stencil being a unified format for the various compile/module/decode paths, we don't need to specialize many of the 'Finish*' methods anymore. Cleaning these up lets us simplify a lot of code.
Similarly, the incremental-encoding code can be simplified to make it easier to share code for main-thread and off-thread parsing.
Assignee | ||
Comment 1•2 years ago
|
||
Replace the 'transcodeOnly' flag with an 'execute' flag and remove the unused
Compile function. Also fix parsemark.py compile options to pass cache checks.
Assignee | ||
Comment 2•2 years ago
|
||
Stop using CompileAndStartIncrementalEncoding in the shell and use the
StartIncrementalEncoding method instead. Share the stencil-instantiation code
between the decode and parse paths.
Depends on D156333
Assignee | ||
Comment 3•2 years ago
|
||
The OffThreadCompileToStencil call doesn't use debug metadata so it should not
be requesting deferred metadata initialization.
Depends on D156334
Assignee | ||
Comment 4•2 years ago
|
||
Off-thread parse and decode all generate JS::Stencils so the various
specializations are not needed for methods that collect the results back to
main-thread.
Depends on D156335
Assignee | ||
Comment 5•2 years ago
|
||
We use the same VM functions now for all the variations, so it not longer makes
sense to have distinct testing functions that must be carefully matched. As a
result we can simplify how off-thread jobs are handled in the shell.
Depends on D156336
Assignee | ||
Comment 6•2 years ago
|
||
Use optional parameter for the InstantiationStorage argument to consolidate the
different overloads. This will make it easier to reuse code for main-thread and
off-thread parsing.
Depends on D156337
Assignee | ||
Comment 7•2 years ago
|
||
Depends on D156338
Assignee | ||
Comment 8•2 years ago
|
||
In all cases we now use JS::StartIncrementalEncoding. Since bytecode encoding is
a somewhat advanced feature, using JS::Stencil types explicitly gives a lot more
flexibility so this convenience function wasn't proving much value.
Depends on D156339
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/501193602b0e Add 'execute' flag to jsshell Evaluate function. r=arai https://hg.mozilla.org/integration/autoland/rev/c17e9ec13b36 Cleanup Evaluate function in jsshell. r=arai https://hg.mozilla.org/integration/autoland/rev/f0b9b4f00c80 Remove extraneous setDeferDebugMetadata calls in jsshell. r=arai https://hg.mozilla.org/integration/autoland/rev/c6e2cb6974e5 Consolidate methods for finishing off-thread JS parse/decode. r=arai https://hg.mozilla.org/integration/autoland/rev/66067684af0a Consolidate the finishOffThread*Stencil shell functions. r=arai https://hg.mozilla.org/integration/autoland/rev/df1b8cb586de Consolidate JS::Instantiate{Global,Module}Stencil function overloads. r=arai https://hg.mozilla.org/integration/autoland/rev/0c6fbdb9a08c Share stencil-instantiate code in JSExecutionContext. r=arai https://hg.mozilla.org/integration/autoland/rev/894c1d7043bb Remove JS::CompileAndStartIncrementalEncoding. r=arai
Updated•2 years ago
|
Comment 10•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/501193602b0e
https://hg.mozilla.org/mozilla-central/rev/c17e9ec13b36
https://hg.mozilla.org/mozilla-central/rev/f0b9b4f00c80
https://hg.mozilla.org/mozilla-central/rev/c6e2cb6974e5
https://hg.mozilla.org/mozilla-central/rev/66067684af0a
https://hg.mozilla.org/mozilla-central/rev/df1b8cb586de
https://hg.mozilla.org/mozilla-central/rev/0c6fbdb9a08c
https://hg.mozilla.org/mozilla-central/rev/894c1d7043bb
Description
•