Closed Bug 1688394 Opened 4 years ago Closed 4 years ago

Remove ScriptStencil::HasMemberInitializers flag

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

As a follow-up to Bug 1688327, we should consider replacing the ScriptStencil::HasMemberInitializers flag with an ImmutableScriptFlag. This makes sense now that the member initializer data is part of initial parse.

Additionally, we would be able to relax the member-initializer conditions from all class-constructors to simply ones that need it. This would solve Bug 1622371 regression.

Replace this with ImmutableScriptFlagsEnum::UseMemberInitializers since it
must have a consistent value across initial and delazify parses.

If a scripted class constructor has zero member initializers associated with
it, we now avoid storing and updating MemberInitializers data for it. This
avoids the need allocate PrivateScriptData for lazy class constructors that
have no fields or inner functions which saves memory overhead.

Depends on D102840

Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1448619c7edd Remove ScriptStencil::HasMemberInitializers. r=arai https://hg.mozilla.org/integration/autoland/rev/d16ebdaed14f Only set UseMemberInitializers if there are any. r=arai
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: