Consider using CompilationState directly from CompilationStencil during delazification
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: tcampbell, Assigned: arai)
References
(Blocks 1 open bug)
Details
Attachments
(16 files, 9 obsolete 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 | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
The CompilationState
structure is stack-allocated and used directly by parser to accumulate stencil data. We currently then convert this to the final stencil structure. In the case of delazification (and probably eval), if we aren't going to cache the stencil then we should just use the CompilationState
directly. Since the CompilationStencil
uses Span
s, we can just point into the CompilationState similar to we do for XDR decode.
Assignee | ||
Comment 1•1 year ago
|
||
I have another idea about optimizing away the copy inside CompilationState::finish
, in bug 1692648.
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Assignee | ||
Comment 11•1 year ago
|
||
uh, sorry, I wrote wrong bug number :P
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Assignee | ||
Comment 21•1 year ago
|
||
bug 1687095 patch achieves it, as part of making "merge" operation work.
https://phabricator.services.mozilla.com/D105154
that patch stack, including bug 1692648, moves stencil-related fields of CompilationState
into Vector-variant of CompilationStencil
,
and makes the instantiation logic compatible with it.
Reporter | ||
Updated•1 year ago
|
Assignee | ||
Comment 22•1 year ago
|
||
BorrowingCompilationStencil provides a CompilationStencil instance that
borrows all ExtensibleCompilationStencil data,
Depends on D105892
Assignee | ||
Comment 23•1 year ago
|
||
Depends on D105893
Assignee | ||
Comment 24•1 year ago
|
||
Depends on D105894
Assignee | ||
Comment 25•1 year ago
|
||
Make all classes to follow init() + compile() + stencil().
stencil() returns a reference to ExtensibleCompilationStencil, and consumer
can either use BorrowingCompilationStencil to create temporary
CompilationStencil from it, or use ExtensibleCompilationStencil::finish to
get non-temporary CompilationStencil.
Depends on D105895
Assignee | ||
Comment 26•1 year ago
|
||
To support instantiating without heap-allocate CompilationStencil, modify
CompileGlobalScriptToStencil to receive either CompilationStencil pointer or
CompilationGCOutput pointer, and if CompilationGCOutput pointer is passed,
instantiate it internally.
Depends on D105896
Assignee | ||
Comment 27•1 year ago
|
||
For the case the consumer needs heap-allocated ExtensibleCompilationStencil,
make CompileGlobalScriptToStencilAndMaybeInstantiate possible to also return
ExtensibleCompilationStencil.
Depends on D105897
Assignee | ||
Comment 28•1 year ago
|
||
Also cleanup JSRuntime::initSelfHosting not to reuse already-initialized
CompilationInput from decode to compile.
Depends on D105898
Assignee | ||
Comment 29•1 year ago
|
||
Depends on D105899
Assignee | ||
Comment 30•1 year ago
|
||
Depends on D105900
Assignee | ||
Comment 31•1 year ago
|
||
Depends on D105901
Assignee | ||
Comment 32•1 year ago
|
||
Depends on D105902
Assignee | ||
Comment 33•1 year ago
|
||
Depends on D105903
Assignee | ||
Comment 34•1 year ago
|
||
Depends on D105904
Assignee | ||
Comment 35•1 year ago
|
||
Depends on D105905
Assignee | ||
Comment 36•1 year ago
|
||
Depends on D105906
Assignee | ||
Comment 37•1 year ago
|
||
reflect_parse wasn't using CompilationStencil, but uses
ExtensibleCompilationStencil in CompilationState.
Depends on D105907
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 38•1 year ago
|
||
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/a21a62d5bb75 Part 1: Add BorrowingCompilationStencil. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/386088c6a895 Part 2: Move finish to ExtensibleCompilationStencil. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/a0aa13363ec0 Part 3: Make more CompilationStencil& parameter const. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/24c81af7409a Part 4: Unify Compiler class interface. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/3ef7987a19b9 Part 5: Add CompileGlobalScriptToStencilAndMaybeInstantiate. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/82c26c5615f5 Part 6: Add frontend::CompileGlobalScriptToExtensibleStencil. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/55d1272f20fd Part 7: Cleanup JSRuntime::initSelfHosting. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/80291c93484e Part 8: Add ExtensibleCompilationStencil::{sizeOfExcludingThis,sizeOfIncludingThis}. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/c18e9015fe3b Part 9: Use ExtensibleCompilationStencil in off-thread script compilation task. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/2ff79c45b786 Part 10: Add ParseModuleToStencilAndMaybeInstantiate. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/271602dcf18d Part 11: Use ExtensibleCompilationStencil in off-thread module compilation task r=tcampbell https://hg.mozilla.org/integration/autoland/rev/954ab0b62640 Part 12: Add frontend::CompileLazyFunction. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/3f4ceb6458d7 Part 13: Use frontend::CompileGlobalScriptToExtensibleStencil in CompileSourceBufferAndStartIncrementalEncoding. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/b7676660de86 Part 14: Use frontend::CompileGlobalScriptToExtensibleStencil in CompileStencilXDR. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/eb0886f3a78a Part 15: Use frontend::CompileGlobalScriptToExtensibleStencil in DumpStencil. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/6a1f9a908a97 Part 16: Remove unnecessary and redundant ExtensibleCompilationStencil::finish from reflect_parse. r=tcampbell
Comment 39•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a21a62d5bb75
https://hg.mozilla.org/mozilla-central/rev/386088c6a895
https://hg.mozilla.org/mozilla-central/rev/a0aa13363ec0
https://hg.mozilla.org/mozilla-central/rev/24c81af7409a
https://hg.mozilla.org/mozilla-central/rev/3ef7987a19b9
https://hg.mozilla.org/mozilla-central/rev/82c26c5615f5
https://hg.mozilla.org/mozilla-central/rev/55d1272f20fd
https://hg.mozilla.org/mozilla-central/rev/80291c93484e
https://hg.mozilla.org/mozilla-central/rev/c18e9015fe3b
https://hg.mozilla.org/mozilla-central/rev/2ff79c45b786
https://hg.mozilla.org/mozilla-central/rev/271602dcf18d
https://hg.mozilla.org/mozilla-central/rev/954ab0b62640
https://hg.mozilla.org/mozilla-central/rev/3f4ceb6458d7
https://hg.mozilla.org/mozilla-central/rev/b7676660de86
https://hg.mozilla.org/mozilla-central/rev/eb0886f3a78a
https://hg.mozilla.org/mozilla-central/rev/6a1f9a908a97
Description
•