Combine JSFunction lazy_ / script_ fields
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
Details
Attachments
(3 files)
Use js::BaseScript* as a common field for LazyScript and JSScript in JSFunction. This is a precursor to merging the two types.
The union handles barriers manually and there is a bit of trickiness to preserve here. Remove unecessary accessors like JSFunction::setScript() so there is less barrier code to reason about.
Assignee | ||
Comment 1•3 years ago
|
||
Instead, use JSFunction::maybeCanonicalFunction() which better documents
why the script should already exist.
Assignee | ||
Comment 2•3 years ago
|
||
The LazyScript -> JSScript link is already set during
JSScript::fullyInitFromEmitter.
Depends on D50718
Assignee | ||
Comment 3•3 years ago
|
||
Store js::BaseScript* to unify both the script_ and lazy_ fields of
JSFunction. Remove the mutableScript() and setScript() accessors and
make manual barriers more consistent.
Depends on D50719
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/93cc053b18b9 Remove JSFunction::existingScriptNonDelazifying() r=jandem https://hg.mozilla.org/integration/autoland/rev/a9d765100908 Remove redundant initScript call in DelazifyCanonicalScriptedFunction r=jandem https://hg.mozilla.org/integration/autoland/rev/e53af14c6089 Unify JSFunction script_/lazy_ fields r=jandem
Comment 5•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/93cc053b18b9
https://hg.mozilla.org/mozilla-central/rev/a9d765100908
https://hg.mozilla.org/mozilla-central/rev/e53af14c6089
Comment 6•3 years ago
|
||
bugherderlanding |
Description
•