Skip to content

Commit 2a9eadf

Browse files
committed
Bug 1971269 - Part 2: Remove support for legacy 'inlines.h' header files. r=spidermonkey-reviewers,jandem
Differential Revision: https://phabricator.services.mozilla.com/D255328
1 parent e7d1d79 commit 2a9eadf

File tree

3 files changed

+9
-20
lines changed

3 files changed

+9
-20
lines changed

config/check_spidermonkey_style.py

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
# - No cyclic dependencies.
1313
#
14-
# - No normal header should #include a inlines.h/-inl.h file.
14+
# - No normal header should #include a -inl.h file.
1515
#
1616
# - #ifndef wrappers should have the right form. (XXX: not yet implemented)
1717
# - Every header file should have one.
@@ -222,8 +222,6 @@
222222
-> tests/style/HeaderCycleB3-inl.h
223223
-> tests/style/HeaderCycleB4-inl.h
224224
-> tests/style/HeaderCycleB1-inl.h
225-
-> tests/style/jsheadercycleB5inlines.h
226-
-> tests/style/HeaderCycleB1-inl.h
227225
-> tests/style/HeaderCycleB4-inl.h
228226
229227
""".splitlines(
@@ -264,7 +262,7 @@ def get(filename):
264262
if filename.endswith(".cpp"):
265263
return FileKind.CPP
266264

267-
if filename.endswith(("inlines.h", "-inl.h")):
265+
if filename.endswith("-inl.h"):
268266
return FileKind.INL_H
269267

270268
if filename.endswith((".h", ".hpp")):
@@ -393,13 +391,10 @@ def check_style(enable_fixup):
393391

394392

395393
def module_name(name):
396-
"""Strip the trailing .cpp, .h, inlines.h or -inl.h from a filename."""
394+
"""Strip the trailing .cpp, .h, or -inl.h from a filename."""
397395

398396
return (
399-
name.replace("inlines.h", "")
400-
.replace("-inl.h", "")
401-
.replace(".h", "")
402-
.replace(".cpp", "")
397+
name.replace("-inl.h", "").replace(".h", "").replace(".cpp", "")
403398
) # NOQA: E501
404399

405400

@@ -449,21 +444,20 @@ def section(self, enclosing_inclname):
449444
"""Identify which section inclname belongs to.
450445
451446
The section numbers are as follows.
452-
0. Module header (e.g. jsfoo.h or jsfooinlines.h within jsfoo.cpp)
447+
0. Module header (e.g. jsfoo.h or jsfoo-inl.h within jsfoo.cpp)
453448
1. mozilla/Foo.h
454449
2. <foo.h> or <foo>
455450
3. jsfoo.h, prmjtime.h, etc
456451
4. foo/Bar.h
457-
5. jsfooinlines.h
458-
6. foo/Bar-inl.h
459-
7. non-.h, e.g. *.tbl, *.msg (these can be scattered throughout files)
452+
5. foo/Bar-inl.h
453+
6. non-.h, e.g. *.tbl, *.msg (these can be scattered throughout files)
460454
"""
461455

462456
if self.is_system:
463457
return 2
464458

465459
if not self.inclname.endswith((".h", ".hpp")):
466-
return 7
460+
return 6
467461

468462
# A couple of modules have the .h file in js/ and the .cpp file elsewhere and so need
469463
# special handling.
@@ -475,13 +469,10 @@ def section(self, enclosing_inclname):
475469
return 1
476470

477471
if self.inclname.endswith("-inl.h"):
478-
return 6
472+
return 5
479473

480474
return 4
481475

482-
if self.inclname.endswith("inlines.h"):
483-
return 5
484-
485476
return 3
486477

487478
def quote(self):
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
#include "tests/style/jsheadercycleB5inlines.h"
21
#include "tests/style/HeaderCycleB1-inl.h"

js/src/tests/style/jsheadercycleB5inlines.h

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)