Closed Bug 1502481 Opened 11 months ago Closed 11 months ago

JSScript initialization cleanup

Categories

(Core :: JavaScript Engine, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

Details

Attachments

(5 files)

The initialization sequence is complex for JSScripts and hard to reason about. This bug aims to clean-up that code.
Depends on D9944
This reorganizes the JSScript constructor sequence into the following
layers and responsibilities:

  JSScript(...)         The actual C++ constructor putting script in
                        GC-safe state.
  JSScript::New(...)    Performs allocation within GC.
  JSScript::Create(...) Common initialization for all script
                        initialization pathways.

This is more in-line with how other GC-things are created. The bitfields
saved from compile options are now done at the JSScript::Create level.

Depends on D9945
JSScript::partiallyInit -> JSScript::createPrivateScriptData
JSScript::createScriptData -> JSScript::createSharedScriptData

Depends on D9946
Depends on D9947
Blocks: 1503170
Attachment #9020446 - Attachment description: Bug 1502481 - Cleanup JSScript constructor calls → Bug 1502481 - Cleanup JSScript constructor calls This reorganizes the JSScript constructor sequence into the following layers and responsibilities:
Attachment #9020446 - Attachment description: Bug 1502481 - Cleanup JSScript constructor calls This reorganizes the JSScript constructor sequence into the following layers and responsibilities: → Bug 1502481 - Cleanup JSScript constructor calls
Blocks: 1503496
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6ae3b85ff64c
Use sourceStart/sourceEnd name within JSScript r=jandem
https://hg.mozilla.org/integration/autoland/rev/8ef875ecc917
Cleanup JSScript nits r=jandem
https://hg.mozilla.org/integration/autoland/rev/170515f4f874
Cleanup JSScript constructor calls r=jandem
https://hg.mozilla.org/integration/autoland/rev/63cb6b558afe
Rename JSScript partiallyInit and friends r=jandem
https://hg.mozilla.org/integration/autoland/rev/c25dd8708e93
Cleanup JSScript::initFunctionPrototype r=jandem
You need to log in before you can comment on or make changes to this bug.