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•3 years ago
|
||
Use IWYU to correct all includes and forward declarations for "SharedContext".
Assignee | ||
Comment 2•3 years ago
|
||
Use IWYU to correct all includes and forward declarations for "ModuleSharedContext".
Depends on D131647
Assignee | ||
Comment 3•3 years ago
|
||
Use IWYU to correct all includes and forward declarations for "AbstractScopePtr".
Depends on D131648
Assignee | ||
Comment 4•3 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•3 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•3 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•3 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•3 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•3 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•3 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•3 years ago
|
||
Inlines SetAliasedVarOperation
in preparation for the next part. Also removes
unnecessary parameters.
Depends on D131657
Assignee | ||
Comment 12•3 years ago
|
||
Moves MaybeCheckTDZ
, so we don't have to include "vm/Stack.h" in
"frontend/TDZCheckCache.h".
Depends on D131658
Assignee | ||
Comment 13•3 years ago
|
||
FireOnNewScripts
is unused, when we remove it, we can remove another include
from "frontend/BytecodeCompilation.h".
Depends on D131659
Assignee | ||
Comment 14•3 years ago
|
||
Remove unused FunctionBox
methods to avoid having to include "vm/JSFunction.h".
Depends on D131660
Assignee | ||
Comment 15•3 years ago
|
||
Removes some additional unused methods.
Depends on D131661
Assignee | ||
Comment 16•3 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•3 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•3 years ago
|
||
Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/263637629395 Part 1: Correct includes for frontend/SharedContext. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/a454384cbdb6 Part 2: Correct includes for frontend/ModuleSharedContext. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/731c556d4110 Part 3: Correct includes for frontend/AbstractScopePtr. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/ccd27cae868f Part 4: Remove js_x_str uses in Opcodes.h. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/68388f6652c8 Part 5: Move JSOp enum into Opcodes.h. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/581db8281819 Part 6: Replace BytecodeUtil.h with Opcodes.h include. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/b4135ef21584 Part 7: Remove unnnecessary includes in js/src/frontend. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/a78731c989dc Part 8: Move StaticStrings into its own file. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/f72d8e7d96a9 Part 9: Add explicit includes for "vm/StaticStrings.h". r=tcampbell https://hg.mozilla.org/integration/autoland/rev/aba817aaacfc Part 10: Remove vm/StringType.h include from frontend/ParserAtom.h. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/5ac166a9c853 Part 11: Inline SetAliasedVarOperation. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/3578d15cb4fc Part 12: Move MaybeCheckTDZ into TDZCheckCache. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/7f1eee7b3e96 Part 13: Remove unused function FireOnNewScripts. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/589909686118 Part 14: Remove unused FunctionBox methods. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/308ef0edc4fc Part 15: Remove more unused methods. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/9be34d1d7801 Part 16: Move FixedSlotLimit to ParseContext. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/9dd268da9e6f Part 17: Remove BigIntType.h includes from Stencil.h. r=tcampbell
Comment 19•3 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
•