Closed Bug 1688327 Opened 4 years ago Closed 4 years ago

Simplify JS class-field-initializer parsing

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)

Class constructor scripts currently track the member-initializer data of the class body and save it for bytecode generation. This is currently computed when compiling the enclosing script, while we can now simply do it during initial parse.

This will be much simpler to reason about and allows moving the data to script-extra stencil section to save more memory. As well, this opens the path to allowing syntax parsing of class fields.

Depends on D102822

Attachment #9198779 - Attachment description: Bug 1688327 - Compute ScriptStencil::memberInitializers in initial parse → Bug 1688327 - Compute ScriptStencil::memberInitializers in initial parse. r?arai!
Attachment #9198780 - Attachment description: Bug 1688327 - Move memberInitializers to ScriptExtraStencil → Bug 1688327 - Move memberInitializers to ScriptExtraStencil. r?arai!

Unsurprisingly, supporting lazy parsing as well is way more complex and out of scope.

Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6648750ced7e Compute ScriptStencil::memberInitializers in initial parse. r=arai https://hg.mozilla.org/integration/autoland/rev/991388ec272d Move memberInitializers to ScriptExtraStencil. r=arai
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b2385073866d Compute ScriptStencil::memberInitializers in initial parse. r=arai https://hg.mozilla.org/integration/autoland/rev/c9a4a9f6e6cf Move memberInitializers to ScriptExtraStencil. r=arai
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Flags: needinfo?(tcampbell)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: