Closed Bug 1601698 Opened 1 year ago Closed 1 year ago

Make LazyScriptCreationData owned by FunctionCreationData

Categories

(Core :: JavaScript Engine, enhancement, P5)

enhancement

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: mgaudet, Assigned: mgaudet)

References

Details

Attachments

(4 files)

As an enhancement and clarification, it would be nice to move the ownership of LazyScriptCreationData out of FunctionBox, and instead keep it on FunctionCreationData (if you have a LazyScriptCreationData then the Function you are compiling should also be deferred, and so it can live there).

The challenge right now is that LazyScriptCreationData is a move type due to it holding onto the closed over bindings and the FunctionBoxVector, wheras the FunctionCreationData was originally designed explicitly as a copy type.

This means that there is some challenge in trying to make this ownership happen; in particular, handling the rooting and ownership of FunctionCreationData when faced with trySyntaxParseInnerFunction

Assignee: nobody → mgaudet

Because you will always have a FunctionCreationData if you've got a
LazyScriptCreationData, we can make the latter owned by the former.

Depends on D57158

This was a leftover cleanup item after Bug 1592433

Depends on D57160

Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eff50a52cd36
Replace GenerateFunctionCreationData with constructor r=caroline
https://hg.mozilla.org/integration/autoland/rev/0527a933a353
Make LazyScriptCreationData owned by FunctionCreationData r=caroline
https://hg.mozilla.org/integration/autoland/rev/c5de9f2a0585
Rename publish functions to reflect current state r=caroline
https://hg.mozilla.org/integration/autoland/rev/3167f62a4a8a
Cleanup deferred mode comment r=caroline
You need to log in before you can comment on or make changes to this bug.