Closed Bug 1550616 Opened 5 years ago Closed 5 years ago

Touching TokenStream.h forces far, far too many files to be recompiled

Categories

(Core :: JavaScript Engine, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: Waldo, Assigned: Waldo)

Details

Attachments

(6 files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

A number of headers directly or indirectly #include "frontend/TokenStream.h" when they need none or almost none of it. By carefully modifying a few of those headers, it's possible to significantly reduce the number of *.cpp files that require recompilation.

I've been touching TokenStream.h enough lately, for small changes, that this is seriously biting me. Let's reduce the dependency graph a bit.

Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/autoland/rev/dc57399bbbe3
Move GeneralTokenStreamChars::setFunctionStart to GeneralParser::setFunctionStartAtCurrentToken in Parser.cpp, eliminating one reason SharedContext.h depends on TokenStream.h.  r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/59f2744f50c5
Make FunctionBox::setEnd take the actual uint32_t end, not TokenStreamAnyChars&, and add ParserBase::setFunctionEndFromCurrentToken that calls it passing the correct value, to eliminate another SharedContext.h dependency on... r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/5fd47cd91b82
Make SharedContext.h not #include TokenStream.h now that it doesn't depend on it.  r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/1b35028d64e4
Move Token-related types to a new frontend/Token.h header so needing something like TokenPos doesn't demand a dependency on TokenStream.h.  (ParseNode.h is a notable instance of this.)  r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/b435e9bb58cc
Move ModuleBuilder into its own header so that module object-related data structures don't depend on EitherParser.h (and therefore all of parsing and tokenizing).  r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/f1a3220fc10b
Don't #include EitherParser.h in BytecodeCompilation.h when a simple forward-declaration will do.  r=tcampbell
Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/autoland/rev/703783d5484d
Move GeneralTokenStreamChars::setFunctionStart to GeneralParser::setFunctionStartAtCurrentToken in Parser.cpp, eliminating one reason SharedContext.h depends on TokenStream.h.  r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/c706eab3c639
Make FunctionBox::setEnd take the actual uint32_t end, not TokenStreamAnyChars&, and add ParserBase::setFunctionEndFromCurrentToken that calls it passing the correct value, to eliminate another SharedContext.h dependency on... r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/78749757be96
Make SharedContext.h not #include TokenStream.h now that it doesn't depend on it.  r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/0e910372a956
Move Token-related types to a new frontend/Token.h header so needing something like TokenPos doesn't demand a dependency on TokenStream.h.  (ParseNode.h is a notable instance of this.)  r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/0fde18f5d16f
Move ModuleBuilder into its own header so that module object-related data structures don't depend on EitherParser.h (and therefore all of parsing and tokenizing).  r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/cb00aa26b348
Don't #include EitherParser.h in BytecodeCompilation.h when a simple forward-declaration will do.  r=tcampbell
Flags: needinfo?(jwalden)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: