Fix concurrent delazification of `undefined` in a module.
Categories
(Core :: JavaScript Engine, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox116 | --- | fixed |
People
(Reporter: nbp, Assigned: nbp, NeedInfo)
References
(Blocks 1 open bug)
Details
(Whiteboard: [sp3])
Attachments
(2 files)
When using concurrent delazification with a module, the delazification crashes as names are not found on the scope chain.
At the moment, concurrent delazification is not enabled, nor is it available for modules.
After many hours of instrumentation and investigation, it happens that module functions depend on the global scope chain, which is not part of the Stencil.
Assignee | ||
Comment 1•3 years ago
|
||
When delazifying inner module functions on-demand, the JSObject global is
defined as the enclosing scope. This scope is set by the
CompilationStencil::instantiateStencilAfterPreparation
, as it is shared
between all instantiated modules.
The problem is that the Global scope is not explicit in the Stencil. Thus, when
doing a concurrent delazification from a Stencil, the global scope is not listed
as the enclosing scope of the module.
This patch, hacks the InputScope to work-around the lack of enclosing scope of
Modules, to artificially add a fake-EmptyGlobalScope, which is later used by all
other functions, such as ScopeContext::seachInEnclosingScope
used to resolve
named values such as undefined
.
Assignee | ||
Comment 2•2 years ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Pushed by npierron@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/998204890aed JS Shell: Add option argument to offThreadCompileModuleToStencil. r=arai https://hg.mozilla.org/integration/autoland/rev/bbd5d4b8e2eb Add FakeStencilGlobalScope for parsing inner module functions. r=arai https://hg.mozilla.org/integration/autoland/rev/5a4374cfd962 apply code formatting via Lando
Comment 4•1 year ago
|
||
Backed out 3 changesets (Bug 1760334) for causing SM bustages in ScopeBindingCache.h CLOSED TREE
Log: https://treeherder.mozilla.org/logviewer?job_id=417902606&repo=autoland&lineNumber=1665
Backout: https://hg.mozilla.org/integration/autoland/rev/44753b3cb852aea36a82fb219e6ea6aaab868587
LE: it seems that multiple build are in fact affected, not just SM
Pushed by npierron@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/acc5a2aef3c1 JS Shell: Add option argument to offThreadCompileModuleToStencil. r=arai https://hg.mozilla.org/integration/autoland/rev/d609354ffacf Add FakeStencilGlobalScope for parsing inner module functions. r=arai https://hg.mozilla.org/integration/autoland/rev/20edf5ff2283 apply code formatting via Lando
Comment 6•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/acc5a2aef3c1
https://hg.mozilla.org/mozilla-central/rev/d609354ffacf
https://hg.mozilla.org/mozilla-central/rev/20edf5ff2283
Description
•