Store associated JSFunction directly in JSScript
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
People
(Reporter: tcampbell, Assigned: tcampbell)
References
Details
Attachments
(1 file, 1 obsolete file)
With Bug 1568245 landed, we can now move the functionNonDelazifying behaviour to BaseScript. We also set the BaseScript::functionOrGlobal field to the canonical function for JSScript to be consistent with LazyScript.
Assignee | ||
Comment 1•6 years ago
|
||
For function JSScripts, store the JSFunction in the BaseScript
functionOrGlobal field. This makes JSScript more consistent with the
LazyScript behaviour.
Assignee | ||
Comment 2•6 years ago
|
||
Instead of checking for canonical function using scope chain, we can
directly use the functionOrGlobal field. By moving this to the
BaseScript class we can also simplify the debugger acccess.
Depends on D47070
Assignee | ||
Comment 3•6 years ago
|
||
Needs Bug 1583860 fixed to avoid intermittent tsan failures.
![]() |
||
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2736f38dd2ce
https://hg.mozilla.org/mozilla-central/rev/73734a2e8547
Assignee | ||
Comment 6•6 years ago
|
||
See: https://bugzilla.mozilla.org/show_bug.cgi?id=1585101#c2
Coverage relies on being able to access canonical function during finalization. This previously worked by finding it via the js::Scope. With these patches, the functionOrGlobal_ field is cleared out and we cannot find the canonical function. I'm not sure what the best work around is.
![]() |
||
Updated•6 years ago
|
Assignee | ||
Comment 8•6 years ago
|
||
This is unfortunately coupled to Bug 1585372. I'll part 1 one of this bug first to make the JSFunction available to coverage::InitScriptCoverage. Then I can land Bug 1585372, and finally part 2 of this bug.
![]() |
||
Comment 10•6 years ago
|
||
bugherder |
Assignee | ||
Comment 11•6 years ago
|
||
Breaking part 2 into a separate bug since part 1 was useful on own and landed in previous cycle.
Assignee | ||
Updated•6 years ago
|
Comment 12•6 years ago
|
||
Comment on attachment 9095157 [details]
Bug 1583816 - Add BaseScript::functionNonDelazifying() and simplify code
Revision D47071 was moved to bug 1591405. Setting attachment 9095157 [details] to obsolete.
Description
•