Prepare to defer allocation of JSScript to just before JSScript::fullyInitFromEmitter
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
People
(Reporter: mgaudet, Assigned: mgaudet)
References
Details
Attachments
(4 files, 16 obsolete files)
By the end of this bug I think JSScript::create
and JSScript::fullyInitFromEmitter
ought to collapse together.
This is surprisingly within reach already (not to say there are no blockers, but it's not as far away as I believed) because it turns out that the BytecodeEmitter
does relatively few things with the passed in JSScript
:
BytecodeEmitter::checkSingletonContext
- Field-initalizers are set as part of
emitFunctionScript
- Checking
script->noScriptRval()
setTreatAsRunOnce
.
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Most of the complexity of this patch is trying to preserve the same level of
assertion in the future case where a BytecodeEmitter may or may not have a
pre-allocated script.
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D60712
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D60713
Assignee | ||
Comment 4•4 years ago
|
||
Depends on D60714
Assignee | ||
Comment 5•4 years ago
|
||
Marking as leave open as the first batch won't finish this.
Pushed by mgaudet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9cffcfb914d7 Use parser-options for noScriptRval where possible r=tcampbell https://hg.mozilla.org/integration/autoland/rev/04f020697732 Set field initializers as part of FunctionScriptEmitter::initScript r=djvj https://hg.mozilla.org/integration/autoland/rev/24fd4240a3cf Don't use Script to access ScriptSource object in BytecodeCompiler r=djvj https://hg.mozilla.org/integration/autoland/rev/03c30bc4fb01 Centralize forwarding of LazyScript flags to CreateFromLazy r=djvj
Comment 7•4 years ago
|
||
bugherder |
Assignee | ||
Comment 9•4 years ago
|
||
Also use it to allocate the JSScript inside of BytecodeEmitter::emitFunction
Assignee | ||
Comment 10•4 years ago
|
||
Depends on D64789
Assignee | ||
Comment 11•4 years ago
|
||
Depends on D64790
Assignee | ||
Comment 12•4 years ago
|
||
This is a prepatory step to deferring JSScript allocation.
Depends on D64793
Assignee | ||
Comment 13•4 years ago
|
||
Depends on D64794
Assignee | ||
Comment 14•4 years ago
|
||
Use ScriptAllocationStencil inside of BytecodeEmitter instead of Script, and allocate on demand.
Depends on D64796
Assignee | ||
Comment 15•4 years ago
|
||
Uploaded my current-state-of-the-world patches.
Honestly would probably fold this stack for landing, as the intermediate patches change GC handling three times.
But I wanted this up to use as a discussion point (and also, if someone else starts looking at this they have a starting point)
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 16•4 years ago
|
||
One thing this patch makes pretty clear is that the story for manipulating
immutable flags is very confusing in the front end. For example, we have
flags on the functionbox, but also flags on the BCEScriptStencil, and they
need to get unioned together at script allocation time.
Assignee | ||
Comment 17•4 years ago
|
||
Also use it to allocate the JSScript inside of BytecodeEmitter::emitFunction
Assignee | ||
Comment 18•4 years ago
|
||
Depends on D68253
Assignee | ||
Comment 19•4 years ago
|
||
Use ScriptAllocationStencil inside of BytecodeEmitter instead of Script, and allocate on demand.
Depends on D68254
Assignee | ||
Comment 20•4 years ago
|
||
This is preparation for disconnecting BCEScriptStencil from the BytecodeEmitter to allow subsequent batch initialization
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 21•4 years ago
|
||
Comment on attachment 9135794 [details]
Bug 1607854 - Minimize dependency on BytecodeEmitter member of BCEScriptStencil
Revision D68266 was moved to bug 1618631. Setting attachment 9135794 [details] to obsolete.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 22•4 years ago
|
||
Note: This stack doesn't add any uses of this, but this was invaluable in the
development of this stack, and it was the second time I had implmented this and
not landed it.
Assignee | ||
Comment 23•4 years ago
|
||
Depends on D71997
Assignee | ||
Comment 24•4 years ago
|
||
Depends on D71998
Assignee | ||
Comment 25•4 years ago
|
||
Depends on D71999
Assignee | ||
Comment 26•4 years ago
|
||
Depends on D72000
Assignee | ||
Comment 27•4 years ago
|
||
Splitting this bug to avoid patches going into multiple releases under the same bug.
Retitle as "Prepare -"
Comment 28•4 years ago
|
||
Comment on attachment 9142456 [details]
Bug 1607854 - Add operator== support to SourceExtent r?tcampbell
Revision D71997 was moved to bug 1632260. Setting attachment 9142456 [details] to obsolete.
Comment 29•4 years ago
|
||
Comment on attachment 9142457 [details]
Bug 1607854 - Add a creation extent to SharedContext to drive JSScript allocation r?tcampbell
Revision D71998 was moved to bug 1632260. Setting attachment 9142457 [details] to obsolete.
Comment 30•4 years ago
|
||
Comment on attachment 9142459 [details]
Bug 1607854 - Use shared context immutable flags for doing JSScript::Create r?tcampbell
Revision D71999 was moved to bug 1632260. Setting attachment 9142459 [details] to obsolete.
Comment 31•4 years ago
|
||
Comment on attachment 9142460 [details]
Bug 1607854 - Clarify BytecodeEmitter input output a bit r?tcampbell
Revision D72000 was moved to bug 1632260. Setting attachment 9142460 [details] to obsolete.
Comment 32•4 years ago
|
||
Comment on attachment 9142461 [details]
Bug 1607854 - Defer allocation of JSScript to just before JSScript::fullyInitFromEmitter r?tcampbell
Revision D72001 was moved to bug 1632260. Setting attachment 9142461 [details] to obsolete.
Description
•