Skip to content

Commit e7d1d79

Browse files
committed
Bug 1971269 - Part 1: Handle *.hpp files in check_spidermonkey_style. r=spidermonkey-reviewers,jandem
Differential Revision: https://phabricator.services.mozilla.com/D255327
1 parent 602d0a6 commit e7d1d79

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

config/check_spidermonkey_style.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def get(filename):
267267
if filename.endswith(("inlines.h", "-inl.h")):
268268
return FileKind.INL_H
269269

270-
if filename.endswith(".h"):
270+
if filename.endswith((".h", ".hpp")):
271271
return FileKind.H
272272

273273
if filename.endswith(".tbl"):
@@ -462,7 +462,7 @@ def section(self, enclosing_inclname):
462462
if self.is_system:
463463
return 2
464464

465-
if not self.inclname.endswith(".h"):
465+
if not self.inclname.endswith((".h", ".hpp")):
466466
return 7
467467

468468
# A couple of modules have the .h file in js/ and the .cpp file elsewhere and so need

js/src/builtin/intl/Segmenter.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
#include "builtin/intl/CommonFunctions.h"
2121
#include "gc/AllocKind.h"
2222
#include "gc/GCContext.h"
23+
#include "icu4x/GraphemeClusterSegmenter.hpp"
24+
#include "icu4x/SentenceSegmenter.hpp"
25+
#include "icu4x/WordSegmenter.hpp"
2326
#include "js/CallArgs.h"
2427
#include "js/PropertyDescriptor.h"
2528
#include "js/PropertySpec.h"
@@ -37,10 +40,6 @@
3740
#include "vm/JSObject-inl.h"
3841
#include "vm/NativeObject-inl.h"
3942

40-
#include "icu4x/GraphemeClusterSegmenter.hpp"
41-
#include "icu4x/SentenceSegmenter.hpp"
42-
#include "icu4x/WordSegmenter.hpp"
43-
4443
using namespace js;
4544

4645
const JSClassOps SegmenterObject::classOps_ = {

js/src/builtin/temporal/Calendar.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#include <stdint.h>
3131
#include <utility>
3232

33+
34+
#include "diplomat_runtime.hpp"
3335
#include "jsnum.h"
3436
#include "jstypes.h"
3537
#include "NamespaceImports.h"
@@ -52,6 +54,9 @@
5254
#include "builtin/temporal/ZonedDateTime.h"
5355
#include "gc/Barrier.h"
5456
#include "gc/GCEnum.h"
57+
#include "icu4x/Calendar.hpp"
58+
#include "icu4x/Date.hpp"
59+
#include "icu4x/IsoDate.hpp"
5560
#include "js/AllocPolicy.h"
5661
#include "js/ErrorReport.h"
5762
#include "js/friend/ErrorMessages.h"
@@ -72,11 +77,6 @@
7277
#include "vm/JSObject-inl.h"
7378
#include "vm/ObjectOperations-inl.h"
7479

75-
#include "diplomat_runtime.hpp"
76-
#include "icu4x/Calendar.hpp"
77-
#include "icu4x/Date.hpp"
78-
#include "icu4x/IsoDate.hpp"
79-
8080
// diplomat_simple_write isn't defined in C++ headers, but we have to use it to
8181
// avoid memory allocation.
8282
// (https://github.com/rust-diplomat/diplomat/issues/866)

0 commit comments

Comments
 (0)