Closed Bug 1583816 Opened 5 years ago Closed 5 years ago

Store associated JSFunction directly in JSScript

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
Tracking Status
firefox-esr68 --- wontfix
firefox67 --- wontfix
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- fixed

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.

For function JSScripts, store the JSFunction in the BaseScript
functionOrGlobal field. This makes JSScript more consistent with the
LazyScript behaviour.

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

Needs Bug 1583860 fixed to avoid intermittent tsan failures.

Depends on: 1583860
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2736f38dd2ce
Store associated JSFunction directly in JSScript r=jandem
https://hg.mozilla.org/integration/autoland/rev/73734a2e8547
Add BaseScript::functionNonDelazifying() and simplify code r=jandem
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Regressions: 1585101

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.

Backout by aciure@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bb56e5bd2203
Backed out 2 changesets for causing ccov crashes CLOSED TREE
Status: RESOLVED → REOPENED
Flags: needinfo?(tcampbell)
Resolution: FIXED → ---
Target Milestone: mozilla71 → ---
Depends on: 1585372

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.

Flags: needinfo?(tcampbell)
Keywords: leave-open
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/46c2aeec2408
Store associated JSFunction directly in JSScript r=jandem

Breaking part 2 into a separate bug since part 1 was useful on own and landed in previous cycle.

Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Keywords: leave-open
Resolution: --- → FIXED
Summary: Add BaseScript::functionNonDelazifying() → Store associated JSFunction directly in JSScript
See Also: → 1591405
No longer depends on: 1585372

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.

Attachment #9095157 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: