Remove LazyScript/JSScript::functionDelazifying and friends
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
Details
Attachments
(5 files)
The 'ensureNonLazyCanonicalFunction', 'functionDelazifying' and 'functionNonDelazifying' methods should all be removed. When we delazify a function, we always first find the canonical function and delazify on that. As a result, live JSScript's should always have a non-lazy canonical function. The ensureNonLazyCanonicalFunction and functionDelazifying methods are always no-ops right now. We already have JSScript::function() which is a wrapper around functionNonDelazifying. We should simplify this all but just using JSScript::function() in places that need it.
Assignee | ||
Comment 1•4 years ago
|
||
When a function is delazified, we always delazify the canonical function
first. As a result, when we have the active JSScript, the JSFunction is
already non-lazy.
Assignee | ||
Comment 2•4 years ago
|
||
The canonical function is already made non-lazy when we generated this
script, so this helper doesn't do anything for us.
Depends on D49836
Assignee | ||
Comment 3•4 years ago
|
||
Replace these calls with JSScript::function() to simplify things. There
should not be a distinction between lazy/non-lazy canonical function
once we already have the JSScript created.
Depends on D49837
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
Directly use JSFunction::getOrCreateScript at callers instead. This
makes it easier to track why we care about laziness.
Depends on D49838
Assignee | ||
Comment 5•4 years ago
|
||
Replace with LazyScript::function() for the same reasons as removing
JSScript::functionNonDelazifying().
Depends on D50505
Assignee | ||
Comment 6•4 years ago
|
||
The objective in this bug is to remove the various functionDelazifying() related methods from LazyScript/JSScript. In general, the JSFunction::getOrCreateScript method should be used if I script is actually needed. Functions on the stack are not relazified so if you have the JSScript, the canonical function must already point to it. Subsequent bugs will add JSFunction::baseScript() to be used when either LazyScript or JSScript will do.
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fa30ee7c72cd Remove JSScript::ensureNonLazyCanonicalFunction() r=jandem https://hg.mozilla.org/integration/autoland/rev/327dacef5a07 Remove JSScript::functionDelazifying() r=jandem https://hg.mozilla.org/integration/autoland/rev/b6eb13358523 Remove JSScript::functionNonDelazifying() r=jandem https://hg.mozilla.org/integration/autoland/rev/b415d53def5d Remove LazyScript::functionDelazifying() r=jandem https://hg.mozilla.org/integration/autoland/rev/77f62942e8c9 Remove LazyScript::functionNonDelazifying() r=jandem
Comment 8•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fa30ee7c72cd
https://hg.mozilla.org/mozilla-central/rev/327dacef5a07
https://hg.mozilla.org/mozilla-central/rev/b6eb13358523
https://hg.mozilla.org/mozilla-central/rev/b415d53def5d
https://hg.mozilla.org/mozilla-central/rev/77f62942e8c9
Description
•