Closed Bug 1567579 Opened 1 year ago Closed 1 year ago

Defer initialization of LazyScripts until after all parsing is done.

Categories

(Core :: JavaScript Engine, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: mgaudet, Assigned: mgaudet)

References

(Blocks 2 open bugs)

Details

Attachments

(4 files)

To further our goal of decoupling the parser for the GC, we'd like to be able to avoid creating JSFunctions until after the parser is done its business.

However, we need a JSFunction to allocate a LazyScript, so this bug is about deferring the allocation of the LazyScript until after the parse is done (unblocking deferred function allocation)

Attachment #9079428 - Flags: feedback?(tcampbell)
Attachment #9079428 - Flags: feedback?(jorendorff)
Priority: -- → P1
Blocks: 1569315

This is a good preparation fo deferred function allocation (Bug 1569315),
but also removes some awkward rooting / type issues in deferred lazyscript
allocation

Depends on D39681

Attachment #9079428 - Attachment description: Bug 1567579 - Defer allocation of LazyScript to after parsing → Bug 1567579 - Defer allocation of LazyScript to after parsing r?tcampbell
Attachment #9081372 - Attachment description: Bug 1567579 - Store inner functionboxes instead of inner functions r?tcampbell → Bug 1567579 - Store inner FunctionBoxes instead of inner functions r?tcampbell
Keywords: leave-open
Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fc6a301ce5fc
Set the toStringEnd on the lazyScript directly during construction. r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/211c315c5a40
Store inner FunctionBoxes instead of inner functions r=tcampbell
Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/39eba0684c1b
Use a FunctionBoxVector type to clarify code r=tcampbell
Status: NEW → ASSIGNED
Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/adac722a3dfc
Defer allocation of LazyScript to after parsing r=tcampbell
Attachment #9079428 - Flags: feedback?(tcampbell)
Attachment #9079428 - Flags: feedback?(jorendorff)

Closing out this bug. There is more follow-up work on the defer-function bug but this lazy script handling is now landed.

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Keywords: leave-open
Resolution: --- → FIXED
Regressions: 1576865
Target Milestone: --- → mozilla70
Blocks: 1582558
You need to log in before you can comment on or make changes to this bug.