Closed Bug 1600439 Opened 5 years ago Closed 5 years ago

Replace js::LazyScriptData with js::PrivateScriptData

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

Details

Attachments

(3 files)

The data elements of LazyScriptData are accessed in sequential order and items are all GCPtrs. This makes PrivateScriptData::gcthings a reasonable replacement and we can eliminate the LazyScriptData type altogether. This can be followed by moving the pointer to the BaseScript class.

It it straight-foward for users of LazyScriptData to support a single array
for closedOverBindings and innerFunctions. As a result, we can use
PrivateScriptData as the implementation and eliminate the LazyScriptData type
altogether.

Reorder the classes in JSScript.h so that we can use PrivateScriptData from
within BaseScript.

Depends on D55360

Now that both LazyScript and JSScript have the same pointer field, we can
move to the BaseScript class. The inner-function pointers in the gcthings
array will have the same meaning for both LazyScript and JSScript, but the
other members of gcthings may have different interpretations.

This adds poisoning of the PrivateScriptData in the LazyScript case for
consistency.

Depends on D55361

We currently only relazify leaf functions, which means the closed-over-bindings and inner-functions lists are empty. If we also disallow relazification of class-constructors, then any function that can be relazified will have nullptr for script data. This makes things much simpler when the LazyScript and JSScript are combined as we will not have a lazy script-data to worry about.

Attachment #9112684 - Attachment description: Bug 1600439 - Replace LazyScriptData with PrivateScriptData. → Bug 1600439 - Replace LazyScriptData with PrivateScriptData. r?jandem
Attachment #9112685 - Attachment description: Bug 1600439 - Move js::PrivateScriptData before js::BaseScript. → Bug 1600439 - Move js::PrivateScriptData before js::BaseScript. r?jandem
Attachment #9112686 - Attachment description: Bug 1600439 - Move the PrivateScriptData pointer to js::BaseScript. → Bug 1600439 - Move the PrivateScriptData pointer to js::BaseScript. r?jandem
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/07471e96b2d8 Replace LazyScriptData with PrivateScriptData. r=jandem https://hg.mozilla.org/integration/autoland/rev/47f84263339e Move js::PrivateScriptData before js::BaseScript. r=jandem https://hg.mozilla.org/integration/autoland/rev/617ce539db70 Move the PrivateScriptData pointer to js::BaseScript. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla73 → ---
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7c27b4f099e8 Replace LazyScriptData with PrivateScriptData. r=jandem https://hg.mozilla.org/integration/autoland/rev/400d86749109 Move js::PrivateScriptData before js::BaseScript. r=jandem https://hg.mozilla.org/integration/autoland/rev/6e206063bc18 Move the PrivateScriptData pointer to js::BaseScript. r=jandem
Backout by aiakab@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/9420b5dc27e0 Backed out 7 changesets (bug 1600439, bug 1566466, bug 1591598) for raptor crashes on a CLOSED TREE
Depends on: 1600806
No longer depends on: 1600806
Regressions: 1600806
No longer regressions: 1600806
Pushed by shindli@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/d713e20e9c6f Replace LazyScriptData with PrivateScriptData. r=jandem https://hg.mozilla.org/mozilla-central/rev/6819c66e165b Move js::PrivateScriptData before js::BaseScript. r=jandem https://hg.mozilla.org/mozilla-central/rev/2d261439e5d2 Move the PrivateScriptData pointer to js::BaseScript. r=jandem
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: