Initialize FunctionHasExtraBodyVarScope for lazy BaseScripts
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
Details
Attachments
(1 file)
Currently the FunctionHasExtraBodyVarScope
flag is only set for non-lazy scripts due to it accessing binding information. Since we only care about if there are var bindings or not, and this info is available in a syntax parse, we should support this flag for lazy BaseScripts too.
Assignee | ||
Comment 1•4 years ago
|
||
Move the initialization of this flag to finishFunctionScopes
so that it is
set for both lazy and non-lazy compilations. We add a VarScopeHasBindings
helper to mirror the logic of newVarScopeData
without allocating. We use
the ImmutableFlag to enable consistent initialization for lazy and non-lazy
scripts.
Note that the previous hasExtraBodyVarScope
helper is only used for
bytecode emission which occurs after the FunctionHasExtraBodyVarScope flag is
properly initialized.
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/983377c0fc28 Init FunctionHasExtraBodyVarScope during lazy parse. r=arai
Comment 3•4 years ago
|
||
bugherder |
Description
•