Bug 1508176 - Some clang-format fixes for generated unicode files. r=tcampbell,sylvestre
authorJan de Mooij <jdemooij@mozilla.com>
Wed, 21 Nov 2018 18:30:44 +0000
changeset 447608 ab5ae5f1e381afd603d9b3032c7705a4f620bfdb
parent 447510 e52cc97768090b2950a788912c62bea45505b96b
child 447609 c026a6f2c6cd99e647eee049dc4f37c8cbeddbb1
push id35084
push userebalazs@mozilla.com
push dateThu, 22 Nov 2018 09:19:57 +0000
treeherdermozilla-central@111154a7621c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell, sylvestre
bugs1508176, 1508180
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508176 - Some clang-format fixes for generated unicode files. r=tcampbell,sylvestre * Add generated files to .clang-format-ignore. * Remove the "clang-format off/on" annotations from generated files. * Rename FOR_EACH_NON_BMP_CASE_FOLDING argument from macro to MACRO. See bug 1508180. Differential Revision: https://phabricator.services.mozilla.com/D12536
.clang-format-ignore
js/src/util/Unicode.cpp
js/src/util/UnicodeNonBMP.h
js/src/util/make_unicode.py
--- a/.clang-format-ignore
+++ b/.clang-format-ignore
@@ -10,16 +10,22 @@ gfx/testsd/.*
 .*/gtest/ExampleStylesheet.h
 image/test/.*
 ipc/ipdl/test/.*
 ipc/testshell/.*
 # Generated code
 js/src/builtin/intl/TimeZoneDataGenerated.h
 js/src/jsapi-tests/.*
 
+# Generated by js/src/util/make_unicode.py
+js/src/irregexp/RegExpCharacters-inl.h
+js/src/irregexp/RegExpCharacters.cpp
+js/src/util/Unicode.cpp
+js/src/util/UnicodeNonBMP.h
+
 # Ignored because of bug 1506117 & 1342657
 layout/style/nsCSSAnonBoxList.h
 layout/style/nsCSSCounterDescList.h
 layout/style/nsCSSFontDescList.h
 layout/style/nsCSSKeywordList.h
 layout/style/nsCSSPseudoElementList.h
 layout/style/nsCSSVisitedDependentPropList.h
 layout/style/nsDOMCSSValueList.h
--- a/js/src/util/Unicode.cpp
+++ b/js/src/util/Unicode.cpp
@@ -50,17 +50,16 @@ using namespace js::unicode;
  *    put index as chunk in cache
  *
  *   push index >> shift to index1
  *
  *  increase shift
  *  stop if you found the best shift
  */
 const CharacterInfo unicode::js_charinfo[] = {
-    // clang-format off
     { 0, 0, 0 },
     { 0, 0, 1 },
     { 0, 0, 4 },
     { 0, 32, 2 },
     { 65504, 0, 2 },
     { 0, 0, 2 },
     { 743, 0, 2 },
     { 121, 0, 2 },
@@ -221,21 +220,19 @@ const CharacterInfo unicode::js_charinfo
     { 0, 23221, 2 },
     { 0, 23231, 2 },
     { 0, 23278, 2 },
     { 0, 23254, 2 },
     { 0, 23275, 2 },
     { 0, 928, 2 },
     { 64608, 0, 2 },
     { 26672, 0, 2 },
-    // clang-format on
 };
 
 const uint8_t unicode::index1[] = {
-    // clang-format off
       0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15,  16,  17,
      18,  19,  20,  21,  22,  23,  24,  25,  26,  27,  28,  29,  30,  31,  32,  33,  34,  35,
      36,  37,  38,  39,  40,  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,
      54,  55,  56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  26,  26,  26,  26,
      26,  68,  69,  70,  71,  72,  73,  74,  75,  26,  26,  26,  26,  26,  26,  26,  26,  76,
      77,  78,  79,  80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,
      95,  96,  97,  98,  99, 100, 101, 102,  26, 103,  26, 104, 105, 105, 106, 105, 107, 108,
     109, 110, 111, 112, 113, 114, 115, 116, 117,  94,  94,  94,  94,  94,  94,  94,  94,  94,
@@ -283,21 +280,19 @@ const uint8_t unicode::index1[] = {
      94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,
      94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,
      94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,
      94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,
      94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,
      94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,  94,
      94,  94,  94,  94,  94,  94,  26,  26,  26,  26,  26, 162,  26, 163, 164, 165, 166, 167,
      26,  26,  26,  26, 168, 169, 170, 171, 172, 173,  26, 174, 175, 176, 177, 178,
-     // clang-format on
 };
 
 const uint8_t unicode::index2[] = {
-      // clang-format off
       0,   0,   0,   0,   0,   0,   0,   0,   0,   1,   1,   1,   1,   1,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   1,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   2,   2,   2,   2,   2,   2,
       2,   2,   2,   2,   0,   0,   0,   0,   0,   0,   0,   3,   3,   3,   3,   3,   3,   3,
       3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,   3,
       3,   0,   0,   0,   0,   2,   0,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,
       4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
@@ -925,21 +920,19 @@ const uint8_t unicode::index2[] = {
       5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,
       5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,
       5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,
       5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   5,   0,   0,   0,
       5,   5,   5,   5,   5,   5,   0,   0,   5,   5,   5,   5,   5,   5,   0,   0,   5,   5,
       5,   5,   5,   5,   0,   0,   5,   5,   5,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,
-      // clang-format on
 };
 
 const CodepointsWithSameUpperCaseInfo unicode::js_codepoints_with_same_upper_info[] = {
-    // clang-format off
     { 0, 0, 0 },
     { 32, 0, 0 },
     { 32, 232, 0 },
     { 32, 300, 0 },
     { 0, 200, 0 },
     { 0, 268, 0 },
     { 0, 775, 0 },
     { 1, 0, 0 },
@@ -1065,21 +1058,19 @@ const CodepointsWithSameUpperCaseInfo un
     { 23228, 0, 0 },
     { 23217, 0, 0 },
     { 23221, 0, 0 },
     { 23231, 0, 0 },
     { 23278, 0, 0 },
     { 23254, 0, 0 },
     { 23275, 0, 0 },
     { 928, 0, 0 },
-    // clang-format on
 };
 
 const uint8_t unicode::codepoints_with_same_upper_index1[] = {
-     // clang-format off
       0,   1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   0,   0,  10,  11,  12,  13,  14,
      15,  16,  17,  18,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,  19,  20,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,  21,  22,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,  23,   0,   0,   0,   0,   0,  24,  25,  26,  24,  27,  28,
      29,  30,   0,   0,   0,   0,  31,  32,  33,   0,   0,   0,   0,   0,   0,   0,   0,   0,
@@ -1127,21 +1118,19 @@ const uint8_t unicode::codepoints_with_s
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,  44,   0,   0,   0,
-      // clang-format on
 };
 
 const uint8_t unicode::codepoints_with_same_upper_index2[] = {
-      // clang-format off
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   1,   1,   1,   1,   1,   1,   1,
       1,   2,   1,   1,   1,   1,   1,   1,   1,   1,   1,   3,   1,   1,   1,   1,   1,   1,
       1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   4,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   5,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
@@ -1292,21 +1281,19 @@ const uint8_t unicode::codepoints_with_s
       0,   0,   0,   0,   0,   0,   0,   0,   0,   7,   0,   7,   0, 125,   7,   0,   7,   0,
       7,   0,   7,   0,   7,   0,   0,   0,   0,   7,   0, 126,   0,   0,   7,   0,   7,   0,
       0,   0,   7,   0,   7,   0,   7,   0,   7,   0,   7,   0,   7,   0,   7,   0,   7,   0,
       7,   0,   7,   0, 127, 128, 129, 130, 127,   0, 131, 132, 133, 134,   7,   0,   7,   0,
       7,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
       1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   0,   0,   0,   0,   0,
-      // clang-format on
 };
 
 const FoldingInfo unicode::js_foldinfo[] = {
-    // clang-format off
     { 0, 0, 0, 0 },
     { 32, 0, 0, 0 },
     { 32, 8415, 0, 0 },
     { 32, 300, 0, 0 },
     { 0, 65504, 0, 0 },
     { 0, 65504, 8383, 0 },
     { 0, 65504, 268, 0 },
     { 775, 743, 0, 0 },
@@ -1511,21 +1498,19 @@ const FoldingInfo unicode::js_foldinfo[]
     { 23221, 0, 0, 0 },
     { 23231, 0, 0, 0 },
     { 23278, 0, 0, 0 },
     { 23254, 0, 0, 0 },
     { 23275, 0, 0, 0 },
     { 928, 0, 0, 0 },
     { 0, 64608, 0, 0 },
     { 26672, 0, 0, 0 },
-    // clang-format on
 };
 
 const uint8_t unicode::folding_index1[] = {
-     // clang-format off
       0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,   0,   0,  11,  12,  13,  14,  15,
      16,  17,  18,  19,  20,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,  21,  22,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,  23,  24,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,  25,   0,   0,  26,   0,   0,  27,  28,  29,  27,  30,  31,
      32,  33,   0,   0,   0,   0,  34,  35,  36,   0,   0,   0,   0,   0,   0,   0,   0,   0,
@@ -1573,21 +1558,19 @@ const uint8_t unicode::folding_index1[] 
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,  50,  51,   0,   0,
-      // clang-format on
 };
 
 const uint8_t unicode::folding_index2[] = {
-      // clang-format off
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   1,   1,   1,   1,   1,   1,   1,
       1,   1,   1,   2,   1,   1,   1,   1,   1,   1,   1,   3,   1,   1,   1,   1,   1,   1,
       1,   0,   0,   0,   0,   0,   0,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   5,
       4,   4,   4,   4,   4,   4,   4,   6,   4,   4,   4,   4,   4,   4,   4,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
@@ -1763,23 +1746,21 @@ const uint8_t unicode::folding_index2[] 
     213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   1,   1,   1,   1,   1,   1,   1,
       1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
       1,   0,   0,   0,   0,   0,   0,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,
       4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   4,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-      // clang-format off
 };
 
 bool
 js::unicode::IsIdentifierStartNonBMP(uint32_t codePoint)
 {
-    // clang-format off
     if (codePoint >= 0x10000 && codePoint <= 0x1000B) { // LINEAR B SYLLABLE B008 A .. LINEAR B SYLLABLE B046 JE
         return true;
     }
     if (codePoint >= 0x1000D && codePoint <= 0x10026) { // LINEAR B SYLLABLE B036 JO .. LINEAR B SYLLABLE B032 QO
         return true;
     }
     if (codePoint >= 0x10028 && codePoint <= 0x1003A) { // LINEAR B SYLLABLE B060 RA .. LINEAR B SYLLABLE B042 WO
         return true;
@@ -2422,23 +2403,21 @@ js::unicode::IsIdentifierStartNonBMP(uin
     }
     if (codePoint >= 0x2CEB0 && codePoint <= 0x2EBE0) { // CJK Ideograph Extension F .. CJK Ideograph Extension F
         return true;
     }
     if (codePoint >= 0x2F800 && codePoint <= 0x2FA1D) { // CJK COMPATIBILITY IDEOGRAPH-2F800 .. CJK COMPATIBILITY IDEOGRAPH-2FA1D
         return true;
     }
     return false;
-    // clang-format on
 }
 
 bool
 js::unicode::IsIdentifierPartNonBMP(uint32_t codePoint)
 {
-    // clang-format off
     if (codePoint >= 0x10000 && codePoint <= 0x1000B) { // LINEAR B SYLLABLE B008 A .. LINEAR B SYLLABLE B046 JE
         return true;
     }
     if (codePoint >= 0x1000D && codePoint <= 0x10026) { // LINEAR B SYLLABLE B036 JO .. LINEAR B SYLLABLE B032 QO
         return true;
     }
     if (codePoint >= 0x10028 && codePoint <= 0x1003A) { // LINEAR B SYLLABLE B060 RA .. LINEAR B SYLLABLE B042 WO
         return true;
@@ -3246,17 +3225,16 @@ js::unicode::IsIdentifierPartNonBMP(uint
     }
     if (codePoint >= 0x2F800 && codePoint <= 0x2FA1D) { // CJK COMPATIBILITY IDEOGRAPH-2F800 .. CJK COMPATIBILITY IDEOGRAPH-2FA1D
         return true;
     }
     if (codePoint >= 0xE0100 && codePoint <= 0xE01EF) { // VARIATION SELECTOR-17 .. VARIATION SELECTOR-256
         return true;
     }
     return false;
-    // clang-format on
 }
 
 bool
 js::unicode::ChangesWhenUpperCasedSpecialCasing(char16_t ch)
 {
     if (ch < 0x00DF || ch > 0xFB17) {
         return false;
     }
@@ -3311,17 +3289,16 @@ js::unicode::ChangesWhenUpperCasedSpecia
     // U+FB13 ARMENIAN SMALL LIGATURE MEN NOW .. U+FB17 ARMENIAN SMALL LIGATURE MEN XEH
     return (ch >= 0xFB00 && ch <= 0xFB06) || (ch >= 0xFB13 && ch <= 0xFB17);
 }
 
 size_t
 js::unicode::LengthUpperCaseSpecialCasing(char16_t ch)
 {
     switch(ch) {
-      // clang-format off
       case 0x00DF: return 2; // LATIN SMALL LETTER SHARP S
       case 0x0149: return 2; // LATIN SMALL LETTER N PRECEDED BY APOSTROPHE (LATIN SMALL LETTER APOSTROPHE N)
       case 0x01F0: return 2; // LATIN SMALL LETTER J WITH CARON (LATIN SMALL LETTER J HACEK)
       case 0x0390: return 3; // GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS (GREEK SMALL LETTER IOTA DIAERESIS TONOS)
       case 0x03B0: return 3; // GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS (GREEK SMALL LETTER UPSILON DIAERESIS TONOS)
       case 0x0587: return 2; // ARMENIAN SMALL LIGATURE ECH YIWN
       case 0x1E96: return 2; // LATIN SMALL LETTER H WITH LINE BELOW
       case 0x1E97: return 2; // LATIN SMALL LETTER T WITH DIAERESIS
@@ -3414,17 +3391,16 @@ js::unicode::LengthUpperCaseSpecialCasin
       case 0xFB04: return 3; // LATIN SMALL LIGATURE FFL
       case 0xFB05: return 2; // LATIN SMALL LIGATURE LONG S T
       case 0xFB06: return 2; // LATIN SMALL LIGATURE ST
       case 0xFB13: return 2; // ARMENIAN SMALL LIGATURE MEN NOW
       case 0xFB14: return 2; // ARMENIAN SMALL LIGATURE MEN ECH
       case 0xFB15: return 2; // ARMENIAN SMALL LIGATURE MEN INI
       case 0xFB16: return 2; // ARMENIAN SMALL LIGATURE VEW NOW
       case 0xFB17: return 2; // ARMENIAN SMALL LIGATURE MEN XEH
-      // clang-format on
     }
 
     MOZ_ASSERT_UNREACHABLE("Bad character input.");
     return 0;
 }
 
 void
 js::unicode::AppendUpperCaseSpecialCasing(char16_t ch, char16_t* elements, size_t* index)
@@ -3864,74 +3840,68 @@ js::unicode::AppendUpperCaseSpecialCasin
 /*
  * Identifier start chars:
  * -      36:    $
  * -  65..90: A..Z
  * -      95:    _
  * - 97..122: a..z
  */
 const bool unicode::js_isidstart[] = {
-// clang-format off
 /*       0     1     2     3     4     5     6     7     8     9  */
 /*  0 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /*  1 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /*  2 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /*  3 */ ____, ____, ____, ____, ____, ____, true, ____, ____, ____,
 /*  4 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /*  5 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /*  6 */ ____, ____, ____, ____, ____, true, true, true, true, true,
 /*  7 */ true, true, true, true, true, true, true, true, true, true,
 /*  8 */ true, true, true, true, true, true, true, true, true, true,
 /*  9 */ true, ____, ____, ____, ____, true, ____, true, true, true,
 /* 10 */ true, true, true, true, true, true, true, true, true, true,
 /* 11 */ true, true, true, true, true, true, true, true, true, true,
 /* 12 */ true, true, true, ____, ____, ____, ____, ____,
-// clang-format on
 };
 
 /*
  * Identifier chars:
  * -      36:    $
  * -  48..57: 0..9
  * -  65..90: A..Z
  * -      95:    _
  * - 97..122: a..z
  */
 const bool unicode::js_isident[] = {
-// clang-format off
 /*       0     1     2     3     4     5     6     7     8     9  */
 /*  0 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /*  1 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /*  2 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /*  3 */ ____, ____, ____, ____, ____, ____, true, ____, ____, ____,
 /*  4 */ ____, ____, ____, ____, ____, ____, ____, ____, true, true,
 /*  5 */ true, true, true, true, true, true, true, true, ____, ____,
 /*  6 */ ____, ____, ____, ____, ____, true, true, true, true, true,
 /*  7 */ true, true, true, true, true, true, true, true, true, true,
 /*  8 */ true, true, true, true, true, true, true, true, true, true,
 /*  9 */ true, ____, ____, ____, ____, true, ____, true, true, true,
 /* 10 */ true, true, true, true, true, true, true, true, true, true,
 /* 11 */ true, true, true, true, true, true, true, true, true, true,
 /* 12 */ true, true, true, ____, ____, ____, ____, ____,
-// clang-format on
 };
 
 /* Whitespace chars: '\t', '\n', '\v', '\f', '\r', ' '. */
 const bool unicode::js_isspace[] = {
-// clang-format of
 /*       0     1     2     3     4     5     6     7     8     9  */
 /*  0 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, true,
 /*  1 */ true, true, true, true, ____, ____, ____, ____, ____, ____,
 /*  2 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /*  3 */ ____, ____, true, ____, ____, ____, ____, ____, ____, ____,
 /*  4 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /*  5 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /*  6 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /*  7 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /*  8 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /*  9 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /* 10 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /* 11 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
 /* 12 */ ____, ____, ____, ____, ____, ____, ____, ____,
-// clang-format on
 };
 
 #undef ____
--- a/js/src/util/UnicodeNonBMP.h
+++ b/js/src/util/UnicodeNonBMP.h
@@ -5,75 +5,75 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Generated by make_unicode.py DO NOT MODIFY */
 /* Unicode version: 11.0.0 */
 
 #ifndef util_UnicodeNonBMP_h
 #define util_UnicodeNonBMP_h
 
-// |macro| receives the following arguments
-//   macro(FROM, TO, LEAD, TRAIL_FROM, TRAIL_TO, DIFF)
+// |MACRO| receives the following arguments
+//   MACRO(FROM, TO, LEAD, TRAIL_FROM, TRAIL_TO, DIFF)
 //     FROM:       code point where the range starts
 //     TO:         code point where the range ends
 //     LEAD:       common lead surrogate of FROM and TO
 //     TRAIL_FROM: trail surrogate of FROM
 //     TRAIL_FROM: trail surrogate of TO
 //     DIFF:       the difference between the code point in the range and
 //                 converted code point
 
 // U+10400 DESERET CAPITAL LETTER LONG I .. U+10427 DESERET CAPITAL LETTER EW
 // U+104B0 OSAGE CAPITAL LETTER A .. U+104D3 OSAGE CAPITAL LETTER ZHA
 // U+10C80 OLD HUNGARIAN CAPITAL LETTER A .. U+10CB2 OLD HUNGARIAN CAPITAL LETTER US
 // U+118A0 WARANG CITI CAPITAL LETTER NGAA .. U+118BF WARANG CITI CAPITAL LETTER VIYO
 // U+16E40 MEDEFAIDRIN CAPITAL LETTER M .. U+16E5F MEDEFAIDRIN CAPITAL LETTER Y
 // U+1E900 ADLAM CAPITAL LETTER ALIF .. U+1E921 ADLAM CAPITAL LETTER SHA
-#define FOR_EACH_NON_BMP_LOWERCASE(macro) \
-    macro(0x10400, 0x10427, 0xd801, 0xdc00, 0xdc27, 40) \
-    macro(0x104b0, 0x104d3, 0xd801, 0xdcb0, 0xdcd3, 40) \
-    macro(0x10c80, 0x10cb2, 0xd803, 0xdc80, 0xdcb2, 64) \
-    macro(0x118a0, 0x118bf, 0xd806, 0xdca0, 0xdcbf, 32) \
-    macro(0x16e40, 0x16e5f, 0xd81b, 0xde40, 0xde5f, 32) \
-    macro(0x1e900, 0x1e921, 0xd83a, 0xdd00, 0xdd21, 34)
+#define FOR_EACH_NON_BMP_LOWERCASE(MACRO) \
+    MACRO(0x10400, 0x10427, 0xd801, 0xdc00, 0xdc27, 40) \
+    MACRO(0x104b0, 0x104d3, 0xd801, 0xdcb0, 0xdcd3, 40) \
+    MACRO(0x10c80, 0x10cb2, 0xd803, 0xdc80, 0xdcb2, 64) \
+    MACRO(0x118a0, 0x118bf, 0xd806, 0xdca0, 0xdcbf, 32) \
+    MACRO(0x16e40, 0x16e5f, 0xd81b, 0xde40, 0xde5f, 32) \
+    MACRO(0x1e900, 0x1e921, 0xd83a, 0xdd00, 0xdd21, 34)
 
 // U+10428 DESERET SMALL LETTER LONG I .. U+1044F DESERET SMALL LETTER EW
 // U+104D8 OSAGE SMALL LETTER A .. U+104FB OSAGE SMALL LETTER ZHA
 // U+10CC0 OLD HUNGARIAN SMALL LETTER A .. U+10CF2 OLD HUNGARIAN SMALL LETTER US
 // U+118C0 WARANG CITI SMALL LETTER NGAA .. U+118DF WARANG CITI SMALL LETTER VIYO
 // U+16E60 MEDEFAIDRIN SMALL LETTER M .. U+16E7F MEDEFAIDRIN SMALL LETTER Y
 // U+1E922 ADLAM SMALL LETTER ALIF .. U+1E943 ADLAM SMALL LETTER SHA
-#define FOR_EACH_NON_BMP_UPPERCASE(macro) \
-    macro(0x10428, 0x1044f, 0xd801, 0xdc28, 0xdc4f, -40) \
-    macro(0x104d8, 0x104fb, 0xd801, 0xdcd8, 0xdcfb, -40) \
-    macro(0x10cc0, 0x10cf2, 0xd803, 0xdcc0, 0xdcf2, -64) \
-    macro(0x118c0, 0x118df, 0xd806, 0xdcc0, 0xdcdf, -32) \
-    macro(0x16e60, 0x16e7f, 0xd81b, 0xde60, 0xde7f, -32) \
-    macro(0x1e922, 0x1e943, 0xd83a, 0xdd22, 0xdd43, -34)
+#define FOR_EACH_NON_BMP_UPPERCASE(MACRO) \
+    MACRO(0x10428, 0x1044f, 0xd801, 0xdc28, 0xdc4f, -40) \
+    MACRO(0x104d8, 0x104fb, 0xd801, 0xdcd8, 0xdcfb, -40) \
+    MACRO(0x10cc0, 0x10cf2, 0xd803, 0xdcc0, 0xdcf2, -64) \
+    MACRO(0x118c0, 0x118df, 0xd806, 0xdcc0, 0xdcdf, -32) \
+    MACRO(0x16e60, 0x16e7f, 0xd81b, 0xde60, 0xde7f, -32) \
+    MACRO(0x1e922, 0x1e943, 0xd83a, 0xdd22, 0xdd43, -34)
 
 // U+10400 DESERET CAPITAL LETTER LONG I .. U+10427 DESERET CAPITAL LETTER EW
 // U+104B0 OSAGE CAPITAL LETTER A .. U+104D3 OSAGE CAPITAL LETTER ZHA
 // U+10C80 OLD HUNGARIAN CAPITAL LETTER A .. U+10CB2 OLD HUNGARIAN CAPITAL LETTER US
 // U+118A0 WARANG CITI CAPITAL LETTER NGAA .. U+118BF WARANG CITI CAPITAL LETTER VIYO
 // U+16E40 MEDEFAIDRIN CAPITAL LETTER M .. U+16E5F MEDEFAIDRIN CAPITAL LETTER Y
 // U+1E900 ADLAM CAPITAL LETTER ALIF .. U+1E921 ADLAM CAPITAL LETTER SHA
-#define FOR_EACH_NON_BMP_CASE_FOLDING(macro) \
-    macro(0x10400, 0x10427, 0xd801, 0xdc00, 0xdc27, 40) \
-    macro(0x104b0, 0x104d3, 0xd801, 0xdcb0, 0xdcd3, 40) \
-    macro(0x10c80, 0x10cb2, 0xd803, 0xdc80, 0xdcb2, 64) \
-    macro(0x118a0, 0x118bf, 0xd806, 0xdca0, 0xdcbf, 32) \
-    macro(0x16e40, 0x16e5f, 0xd81b, 0xde40, 0xde5f, 32) \
-    macro(0x1e900, 0x1e921, 0xd83a, 0xdd00, 0xdd21, 34)
+#define FOR_EACH_NON_BMP_CASE_FOLDING(MACRO) \
+    MACRO(0x10400, 0x10427, 0xd801, 0xdc00, 0xdc27, 40) \
+    MACRO(0x104b0, 0x104d3, 0xd801, 0xdcb0, 0xdcd3, 40) \
+    MACRO(0x10c80, 0x10cb2, 0xd803, 0xdc80, 0xdcb2, 64) \
+    MACRO(0x118a0, 0x118bf, 0xd806, 0xdca0, 0xdcbf, 32) \
+    MACRO(0x16e40, 0x16e5f, 0xd81b, 0xde40, 0xde5f, 32) \
+    MACRO(0x1e900, 0x1e921, 0xd83a, 0xdd00, 0xdd21, 34)
 
 // U+10428 DESERET SMALL LETTER LONG I .. U+1044F DESERET SMALL LETTER EW
 // U+104D8 OSAGE SMALL LETTER A .. U+104FB OSAGE SMALL LETTER ZHA
 // U+10CC0 OLD HUNGARIAN SMALL LETTER A .. U+10CF2 OLD HUNGARIAN SMALL LETTER US
 // U+118C0 WARANG CITI SMALL LETTER NGAA .. U+118DF WARANG CITI SMALL LETTER VIYO
 // U+16E60 MEDEFAIDRIN SMALL LETTER M .. U+16E7F MEDEFAIDRIN SMALL LETTER Y
 // U+1E922 ADLAM SMALL LETTER ALIF .. U+1E943 ADLAM SMALL LETTER SHA
-#define FOR_EACH_NON_BMP_REV_CASE_FOLDING(macro) \
-    macro(0x10428, 0x1044f, 0xd801, 0xdc28, 0xdc4f, -40) \
-    macro(0x104d8, 0x104fb, 0xd801, 0xdcd8, 0xdcfb, -40) \
-    macro(0x10cc0, 0x10cf2, 0xd803, 0xdcc0, 0xdcf2, -64) \
-    macro(0x118c0, 0x118df, 0xd806, 0xdcc0, 0xdcdf, -32) \
-    macro(0x16e60, 0x16e7f, 0xd81b, 0xde60, 0xde7f, -32) \
-    macro(0x1e922, 0x1e943, 0xd83a, 0xdd22, 0xdd43, -34)
+#define FOR_EACH_NON_BMP_REV_CASE_FOLDING(MACRO) \
+    MACRO(0x10428, 0x1044f, 0xd801, 0xdc28, 0xdc4f, -40) \
+    MACRO(0x104d8, 0x104fb, 0xd801, 0xdcd8, 0xdcfb, -40) \
+    MACRO(0x10cc0, 0x10cf2, 0xd803, 0xdcc0, 0xdcf2, -64) \
+    MACRO(0x118c0, 0x118df, 0xd806, 0xdcc0, 0xdcdf, -32) \
+    MACRO(0x16e60, 0x16e7f, 0xd81b, 0xde60, 0xde7f, -32) \
+    MACRO(0x1e922, 0x1e943, 0xd83a, 0xdd22, 0xdd43, -34)
 
 #endif /* util_UnicodeNonBMP_h */
--- a/js/src/util/make_unicode.py
+++ b/js/src/util/make_unicode.py
@@ -237,24 +237,24 @@ def make_non_bmp_convert_macro(out_file,
         from_code = entry['code']
         to_code = entry['code'] + entry['length'] - 1
         diff = entry['diff']
 
         lead = entry['lead']
         from_trail = entry['trail']
         to_trail = entry['trail'] + entry['length'] - 1
 
-        lines.append('    macro(0x{:x}, 0x{:x}, 0x{:x}, 0x{:x}, 0x{:x}, {:d})'.format(
+        lines.append('    MACRO(0x{:x}, 0x{:x}, 0x{:x}, 0x{:x}, 0x{:x}, {:d})'.format(
             from_code, to_code, lead, from_trail, to_trail, diff))
         comment.append('// {} .. {}'.format(codepoint_table.full_name(from_code),
                                             codepoint_table.full_name(to_code)))
 
     out_file.write('\n'.join(comment))
     out_file.write('\n')
-    out_file.write('#define FOR_EACH_NON_BMP_{}(macro) \\\n'.format(name))
+    out_file.write('#define FOR_EACH_NON_BMP_{}(MACRO) \\\n'.format(name))
     out_file.write(' \\\n'.join(lines))
     out_file.write('\n')
 
 
 def process_derived_core_properties(derived_core_properties):
     id_start = set()
     id_continue = set()
 
@@ -638,18 +638,18 @@ def make_non_bmp_file(version,
         non_bmp_file.write(mpl_license)
         non_bmp_file.write('\n')
         non_bmp_file.write(warning_message)
         non_bmp_file.write(unicode_version_message.format(version))
         non_bmp_file.write("""
 #ifndef util_UnicodeNonBMP_h
 #define util_UnicodeNonBMP_h
 
-// |macro| receives the following arguments
-//   macro(FROM, TO, LEAD, TRAIL_FROM, TRAIL_TO, DIFF)
+// |MACRO| receives the following arguments
+//   MACRO(FROM, TO, LEAD, TRAIL_FROM, TRAIL_TO, DIFF)
 //     FROM:       code point where the range starts
 //     TO:         code point where the range ends
 //     LEAD:       common lead surrogate of FROM and TO
 //     TRAIL_FROM: trail surrogate of FROM
 //     TRAIL_FROM: trail surrogate of TO
 //     DIFF:       the difference between the code point in the range and
 //                 converted code point