Remove LazyScript::hasNonSyntacticScope
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
Details
Attachments
(1 file)
Currently the definition of hasNonSyntacticScope differs between LazyScript and JSScript. We have already moved the HasNonSyntacticScope flag to BaseScript so this is a bit of a foot-gun (see: Bug 1591921).
Instead, the frontend should properly compute the non-syntactic flag while creating the LazyScript and should use the HasNonSyntacticScope flag to hold result.
Once this is done, the js::CanReuseScriptForClone function should be updated to use baseScript().
Assignee | ||
Comment 1•5 years ago
|
||
Update js::CanReuseScriptForClone to use baseScript() to determine if
non-syntactic. The HasNonSyntacticScope is not computed for lazy scripts so
fall back to checking the scope. Technically this is a fraction slower when
cloning a script with a syntactic global into a function with a non-syntactic
global, but in that case we are just about to clone the entire script
anyways. In practice this rarely comes up.
Updated•5 years ago
|
Comment 3•5 years ago
|
||
bugherder |
Description
•