Closed Bug 1615402 Opened 4 years ago Closed 4 years ago

Factor ImmutableScriptData fields out of ScriptStencil

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: jorendorff, Assigned: jorendorff)

References

(Blocks 1 open bug)

Details

(Whiteboard: [smooshmonkey-mvp])

Attachments

(7 files)

ScriptStencil has a set of fields that are redundant with stuff in ImmutableScriptData. The idea is, instead, for ImmutableScriptData to be a member of the stencil family of types.

Ownership: the field can be a UniquePtr<ImmutableScriptData>.

Priority: -- → P1

Doing this causes JSScript::fullyInitFromStencil to consume the stencil, because it has to take ownership of the UniquePtr. The alternative would be something like Rust's Arc<T>.

Assignee: nobody → jorendorff
Status: NEW → ASSIGNED

It is apparently completely unnecessary.

Depends on D63657

I'm going to wait and land this after bug 1612515.

Whiteboard: [smooshmonkey-mvp]
Pushed by jorendorff@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/de45fa761e5d
Part 1: Change ImmutableScriptData::new_ to return UniquePtr. r=mgaudet
https://hg.mozilla.org/integration/autoland/rev/f3173b7c223c
Part 2: Change JSScript::createImmutableScriptData to initImmutableScriptData. r=mgaudet
https://hg.mozilla.org/integration/autoland/rev/9c1fc73b9163
Part 3: Change ImmutableScriptData::XDR to not need friend access to JSScript. r=mgaudet
https://hg.mozilla.org/integration/autoland/rev/c4dc09959bed
Part 4: Remove js::frontend::CGScopeNote. r=mgaudet
Pushed by jorendorff@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c00b5eef4b78
Part 5: Factor out an ImmutableScriptData from ScriptStencil. r=mgaudet
https://hg.mozilla.org/integration/autoland/rev/24af972b7541
Part 6: Add field initializers to ScopeNote. r=mgaudet
https://hg.mozilla.org/integration/autoland/rev/67cc4f2b6248
Part 7: Update SmooshScriptStencil. r=arai
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: