Clean-up some includes in js/src/frontend
Categories
(Core :: JavaScript Engine, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox96 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(17 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
Clean-up some includes in "js/src/frontend". For the most part remove unnecessary includes and try to avoid including "js/src/vm" in frontend header files if possible.
| Assignee | ||
Comment 1•4 years ago
|
||
Use IWYU to correct all includes and forward declarations for "SharedContext".
| Assignee | ||
Comment 2•4 years ago
|
||
Use IWYU to correct all includes and forward declarations for "ModuleSharedContext".
Depends on D131647
| Assignee | ||
Comment 3•4 years ago
|
||
Use IWYU to correct all includes and forward declarations for "AbstractScopePtr".
Depends on D131648
| Assignee | ||
Comment 4•4 years ago
|
||
"Opcodes.h" includes "vm/WellKnownAtom.h" for five js_x_str definitions. These
are only used by CodeToken in "vm/BytecodeUtil.cpp". If we replace them with
string literals, we can avoid including "vm/WellKnownAtom.h" and all its transitive
includes, which is useful because "Opcodes.h" is included in many files.
Depends on D131649
| Assignee | ||
Comment 5•4 years ago
|
||
We have a surprisingly large number of files which are including "Opcodes.h"
for the definition of JSOp, even though JSOp is actually defined in
"BytecodeUtil.h". Let's move the definition of JSOp into "Opcodes.h" to match
where people expect it should be defined.
Depends on D131650
| Assignee | ||
Comment 6•4 years ago
|
||
Replace all "BytecodeUtil.h" includes with "Opcodes.h" when only needed for the
definition of JSOp. Also remove all "BytecodeUtil.h" includes which don't use
any definition from "BytecodeUtil.h" or "Opcodes.h".
Depends on D131651
| Assignee | ||
Comment 7•4 years ago
|
||
Parts 1-3 performed a thorough clean-up of include statements, where unnecessary
includes were removed and missing includes were added. This patch only removes
unnecessary includes. Additional includes were mostly only added to ensure the
files can stil be built.
Depends on D131652
| Assignee | ||
Comment 8•4 years ago
|
||
"frontend/ParserAtom.h" includes "vm/StringType.h" for the definition of
StaticStrings. If we move StaticStrings into a separate file, we can avoid
including "vm/StringType.h" in "frontend/ParserAtom.h", which is useful because
"frontend/ParserAtom.h" is (transitively) included in many files.
Depends on D131653
| Assignee | ||
Comment 9•4 years ago
|
||
The previous part moved StaticStrings into a separate file, but didn't update
the includes to use "vm/StaticStrings.h".
Depends on D131655
| Assignee | ||
Comment 10•4 years ago
|
||
After parts 8-9, the "vm/StringType.h" include was only needed for
JSString::MAX_LENGTH. If we remove that (unused!) reference, we can remove
the include to "vm/StringType.h". And then fix any missing includes which were
previously only transitively included through "vm/StringType.h".
Depends on D131656
| Assignee | ||
Comment 11•4 years ago
|
||
Inlines SetAliasedVarOperation in preparation for the next part. Also removes
unnecessary parameters.
Depends on D131657
| Assignee | ||
Comment 12•4 years ago
|
||
Moves MaybeCheckTDZ, so we don't have to include "vm/Stack.h" in
"frontend/TDZCheckCache.h".
Depends on D131658
| Assignee | ||
Comment 13•4 years ago
|
||
FireOnNewScripts is unused, when we remove it, we can remove another include
from "frontend/BytecodeCompilation.h".
Depends on D131659
| Assignee | ||
Comment 14•4 years ago
|
||
Remove unused FunctionBox methods to avoid having to include "vm/JSFunction.h".
Depends on D131660
| Assignee | ||
Comment 15•4 years ago
|
||
Removes some additional unused methods.
Depends on D131661
| Assignee | ||
Comment 16•4 years ago
|
||
If we move FixedSlotLimit from AbstractGeneratorObject into ParseContext,
we can avoid to include "vm/GeneratorObject.h" in "frontend/ParseContext.h".
Depends on D131662
| Assignee | ||
Comment 17•4 years ago
|
||
Neither of two functions seem performance critical, so we can move them into
the cpp-file to avoid having to include "vm/BigIntType.h".
Depends on D131663
Comment 18•4 years ago
|
||
Comment 19•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/263637629395
https://hg.mozilla.org/mozilla-central/rev/a454384cbdb6
https://hg.mozilla.org/mozilla-central/rev/731c556d4110
https://hg.mozilla.org/mozilla-central/rev/ccd27cae868f
https://hg.mozilla.org/mozilla-central/rev/68388f6652c8
https://hg.mozilla.org/mozilla-central/rev/581db8281819
https://hg.mozilla.org/mozilla-central/rev/b4135ef21584
https://hg.mozilla.org/mozilla-central/rev/a78731c989dc
https://hg.mozilla.org/mozilla-central/rev/f72d8e7d96a9
https://hg.mozilla.org/mozilla-central/rev/aba817aaacfc
https://hg.mozilla.org/mozilla-central/rev/5ac166a9c853
https://hg.mozilla.org/mozilla-central/rev/3578d15cb4fc
https://hg.mozilla.org/mozilla-central/rev/7f1eee7b3e96
https://hg.mozilla.org/mozilla-central/rev/589909686118
https://hg.mozilla.org/mozilla-central/rev/308ef0edc4fc
https://hg.mozilla.org/mozilla-central/rev/9be34d1d7801
https://hg.mozilla.org/mozilla-central/rev/9dd268da9e6f
Description
•