Bug 1570370 - Part 7: Remove no longer used JS code generation parts from make_intl_data. r=jwalden
authorAndré Bargull <andre.bargull@gmail.com>
Fri, 11 Oct 2019 19:25:49 +0000
changeset 497320 e7dbd9ac5b7ddbc9fbad5386f1814fbce72be383
parent 497319 7e272f3c9fa48620151dbdd970802be7d3c0271e
child 497321 51c5dbb80a13ffa44f320ee0562cc6e770733b0d
push id36682
push userncsoregi@mozilla.com
push dateSat, 12 Oct 2019 09:52:03 +0000
treeherdermozilla-central@06ea2371f897 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs1570370
milestone71.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 1570370 - Part 7: Remove no longer used JS code generation parts from make_intl_data. r=jwalden Also removes the "Native"-suffix from function names. Differential Revision: https://phabricator.services.mozilla.com/D40073
js/src/builtin/intl/LangTagMappingsGenerated.js
js/src/builtin/intl/UnicodeExtensionsGenerated.js
js/src/builtin/intl/make_intl_data.py
js/src/moz.build
deleted file mode 100644
--- a/js/src/builtin/intl/LangTagMappingsGenerated.js
+++ /dev/null
@@ -1,1209 +0,0 @@
-// Generated by make_intl_data.py. DO NOT EDIT.
-
-// Mappings from grandfathered tags to preferred values.
-// Derived from CLDR Supplemental Data, version 35.1.
-// https://github.com/unicode-org/cldr.git
-var grandfatheredMappings = {
-    "art-lojban": "jbo",
-    "cel-gaulish": "xtg-x-cel-gaulish",
-    "zh-guoyu": "zh",
-    "zh-hakka": "hak",
-    "zh-xiang": "hsn",
-};
-
-// Mappings from language subtags to preferred values.
-// Derived from CLDR Supplemental Data, version 35.1.
-// https://github.com/unicode-org/cldr.git
-var languageMappings = {
-    "aam": "aas",
-    "aar": "aa",
-    "abk": "ab",
-    "adp": "dz",
-    "afr": "af",
-    "aju": "jrb",
-    "aka": "ak",
-    "alb": "sq",
-    "als": "sq",
-    "amh": "am",
-    "ara": "ar",
-    "arb": "ar",
-    "arg": "an",
-    "arm": "hy",
-    "asm": "as",
-    "aue": "ktz",
-    "ava": "av",
-    "ave": "ae",
-    "aym": "ay",
-    "ayr": "ay",
-    "ayx": "nun",
-    "aze": "az",
-    "azj": "az",
-    "bak": "ba",
-    "bam": "bm",
-    "baq": "eu",
-    "bcc": "bal",
-    "bcl": "bik",
-    "bel": "be",
-    "ben": "bn",
-    "bgm": "bcg",
-    "bh": "bho",
-    "bih": "bho",
-    "bis": "bi",
-    "bjd": "drl",
-    "bod": "bo",
-    "bos": "bs",
-    "bre": "br",
-    "bul": "bg",
-    "bur": "my",
-    "bxk": "luy",
-    "bxr": "bua",
-    "cat": "ca",
-    "ccq": "rki",
-    "ces": "cs",
-    "cha": "ch",
-    "che": "ce",
-    "chi": "zh",
-    "chu": "cu",
-    "chv": "cv",
-    "cjr": "mom",
-    "cka": "cmr",
-    "cld": "syr",
-    "cmk": "xch",
-    "cmn": "zh",
-    "cor": "kw",
-    "cos": "co",
-    "coy": "pij",
-    "cqu": "quh",
-    "cre": "cr",
-    "cwd": "cr",
-    "cym": "cy",
-    "cze": "cs",
-    "dan": "da",
-    "deu": "de",
-    "dgo": "doi",
-    "dhd": "mwr",
-    "dik": "din",
-    "diq": "zza",
-    "div": "dv",
-    "drh": "mn",
-    "dut": "nl",
-    "dzo": "dz",
-    "ekk": "et",
-    "ell": "el",
-    "emk": "man",
-    "eng": "en",
-    "epo": "eo",
-    "esk": "ik",
-    "est": "et",
-    "eus": "eu",
-    "ewe": "ee",
-    "fao": "fo",
-    "fas": "fa",
-    "fat": "ak",
-    "fij": "fj",
-    "fin": "fi",
-    "fra": "fr",
-    "fre": "fr",
-    "fry": "fy",
-    "fuc": "ff",
-    "ful": "ff",
-    "gav": "dev",
-    "gaz": "om",
-    "gbo": "grb",
-    "geo": "ka",
-    "ger": "de",
-    "gfx": "vaj",
-    "ggn": "gvr",
-    "gla": "gd",
-    "gle": "ga",
-    "glg": "gl",
-    "glv": "gv",
-    "gno": "gon",
-    "gre": "el",
-    "grn": "gn",
-    "gti": "nyc",
-    "gug": "gn",
-    "guj": "gu",
-    "guv": "duz",
-    "gya": "gba",
-    "hat": "ht",
-    "hau": "ha",
-    "hdn": "hai",
-    "hea": "hmn",
-    "heb": "he",
-    "her": "hz",
-    "him": "srx",
-    "hin": "hi",
-    "hmo": "ho",
-    "hrr": "jal",
-    "hrv": "hr",
-    "hun": "hu",
-    "hye": "hy",
-    "ibi": "opa",
-    "ibo": "ig",
-    "ice": "is",
-    "ido": "io",
-    "iii": "ii",
-    "ike": "iu",
-    "iku": "iu",
-    "ile": "ie",
-    "ilw": "gal",
-    "in": "id",
-    "ina": "ia",
-    "ind": "id",
-    "ipk": "ik",
-    "isl": "is",
-    "ita": "it",
-    "iw": "he",
-    "jav": "jv",
-    "jeg": "oyb",
-    "ji": "yi",
-    "jpn": "ja",
-    "jw": "jv",
-    "kal": "kl",
-    "kan": "kn",
-    "kas": "ks",
-    "kat": "ka",
-    "kau": "kr",
-    "kaz": "kk",
-    "kgc": "tdf",
-    "kgh": "kml",
-    "khk": "mn",
-    "khm": "km",
-    "kik": "ki",
-    "kin": "rw",
-    "kir": "ky",
-    "kmr": "ku",
-    "knc": "kr",
-    "kng": "kg",
-    "knn": "kok",
-    "koj": "kwv",
-    "kom": "kv",
-    "kon": "kg",
-    "kor": "ko",
-    "kpv": "kv",
-    "krm": "bmf",
-    "ktr": "dtp",
-    "kua": "kj",
-    "kur": "ku",
-    "kvs": "gdj",
-    "kwq": "yam",
-    "kxe": "tvd",
-    "kzj": "dtp",
-    "kzt": "dtp",
-    "lao": "lo",
-    "lat": "la",
-    "lav": "lv",
-    "lbk": "bnc",
-    "lii": "raq",
-    "lim": "li",
-    "lin": "ln",
-    "lit": "lt",
-    "lmm": "rmx",
-    "ltz": "lb",
-    "lub": "lu",
-    "lug": "lg",
-    "lvs": "lv",
-    "mac": "mk",
-    "mah": "mh",
-    "mal": "ml",
-    "mao": "mi",
-    "mar": "mr",
-    "may": "ms",
-    "meg": "cir",
-    "mhr": "chm",
-    "mkd": "mk",
-    "mlg": "mg",
-    "mlt": "mt",
-    "mnk": "man",
-    "mo": "ro",
-    "mol": "ro",
-    "mon": "mn",
-    "mri": "mi",
-    "msa": "ms",
-    "mst": "mry",
-    "mup": "raj",
-    "mwj": "vaj",
-    "mya": "my",
-    "myt": "mry",
-    "nad": "xny",
-    "nau": "na",
-    "nav": "nv",
-    "nbl": "nr",
-    "ncp": "kdz",
-    "nde": "nd",
-    "ndo": "ng",
-    "nep": "ne",
-    "nld": "nl",
-    "nno": "nn",
-    "nnx": "ngv",
-    "no": "nb",
-    "nob": "nb",
-    "nor": "nb",
-    "npi": "ne",
-    "nts": "pij",
-    "nya": "ny",
-    "oci": "oc",
-    "ojg": "oj",
-    "oji": "oj",
-    "ori": "or",
-    "orm": "om",
-    "ory": "or",
-    "oss": "os",
-    "oun": "vaj",
-    "pan": "pa",
-    "pbu": "ps",
-    "pcr": "adx",
-    "per": "fa",
-    "pes": "fa",
-    "pli": "pi",
-    "plt": "mg",
-    "pmc": "huw",
-    "pmu": "phr",
-    "pnb": "lah",
-    "pol": "pl",
-    "por": "pt",
-    "ppa": "bfy",
-    "ppr": "lcq",
-    "pry": "prt",
-    "pus": "ps",
-    "puz": "pub",
-    "que": "qu",
-    "quz": "qu",
-    "rmy": "rom",
-    "roh": "rm",
-    "ron": "ro",
-    "rum": "ro",
-    "run": "rn",
-    "rus": "ru",
-    "sag": "sg",
-    "san": "sa",
-    "sca": "hle",
-    "scc": "sr",
-    "scr": "hr",
-    "sin": "si",
-    "skk": "oyb",
-    "slk": "sk",
-    "slo": "sk",
-    "slv": "sl",
-    "sme": "se",
-    "smo": "sm",
-    "sna": "sn",
-    "snd": "sd",
-    "som": "so",
-    "sot": "st",
-    "spa": "es",
-    "spy": "kln",
-    "sqi": "sq",
-    "src": "sc",
-    "srd": "sc",
-    "srp": "sr",
-    "ssw": "ss",
-    "sun": "su",
-    "swa": "sw",
-    "swe": "sv",
-    "swh": "sw",
-    "tah": "ty",
-    "tam": "ta",
-    "tat": "tt",
-    "tdu": "dtp",
-    "tel": "te",
-    "tgk": "tg",
-    "tgl": "fil",
-    "tha": "th",
-    "thc": "tpo",
-    "thx": "oyb",
-    "tib": "bo",
-    "tie": "ras",
-    "tir": "ti",
-    "tkk": "twm",
-    "tl": "fil",
-    "tlw": "weo",
-    "tmp": "tyj",
-    "tne": "kak",
-    "ton": "to",
-    "tsf": "taj",
-    "tsn": "tn",
-    "tso": "ts",
-    "ttq": "tmh",
-    "tuk": "tk",
-    "tur": "tr",
-    "tw": "ak",
-    "twi": "ak",
-    "uig": "ug",
-    "ukr": "uk",
-    "umu": "del",
-    "uok": "ema",
-    "urd": "ur",
-    "uzb": "uz",
-    "uzn": "uz",
-    "ven": "ve",
-    "vie": "vi",
-    "vol": "vo",
-    "wel": "cy",
-    "wln": "wa",
-    "wol": "wo",
-    "xba": "cax",
-    "xho": "xh",
-    "xia": "acn",
-    "xkh": "waw",
-    "xpe": "kpe",
-    "xsj": "suj",
-    "xsl": "den",
-    "ybd": "rki",
-    "ydd": "yi",
-    "yid": "yi",
-    "yma": "lrr",
-    "ymt": "mtm",
-    "yor": "yo",
-    "yos": "zom",
-    "yuu": "yug",
-    "zai": "zap",
-    "zha": "za",
-    "zho": "zh",
-    "zsm": "ms",
-    "zul": "zu",
-    "zyb": "za",
-};
-
-// Language subtags with complex mappings.
-// Derived from CLDR Supplemental Data, version 35.1.
-// https://github.com/unicode-org/cldr.git
-var complexLanguageMappings = {
-    "cnr": true,
-    "drw": true,
-    "hbs": true,
-    "prs": true,
-    "sh": true,
-    "swc": true,
-    "tnf": true,
-};
-
-// Mappings from region subtags to preferred values.
-// Derived from CLDR Supplemental Data, version 35.1.
-// https://github.com/unicode-org/cldr.git
-var regionMappings = {
-    "004": "AF",
-    "008": "AL",
-    "010": "AQ",
-    "012": "DZ",
-    "016": "AS",
-    "020": "AD",
-    "024": "AO",
-    "028": "AG",
-    "031": "AZ",
-    "032": "AR",
-    "036": "AU",
-    "040": "AT",
-    "044": "BS",
-    "048": "BH",
-    "050": "BD",
-    "051": "AM",
-    "052": "BB",
-    "056": "BE",
-    "060": "BM",
-    "062": "034",
-    "064": "BT",
-    "068": "BO",
-    "070": "BA",
-    "072": "BW",
-    "074": "BV",
-    "076": "BR",
-    "084": "BZ",
-    "086": "IO",
-    "090": "SB",
-    "092": "VG",
-    "096": "BN",
-    "100": "BG",
-    "104": "MM",
-    "108": "BI",
-    "112": "BY",
-    "116": "KH",
-    "120": "CM",
-    "124": "CA",
-    "132": "CV",
-    "136": "KY",
-    "140": "CF",
-    "144": "LK",
-    "148": "TD",
-    "152": "CL",
-    "156": "CN",
-    "158": "TW",
-    "162": "CX",
-    "166": "CC",
-    "170": "CO",
-    "174": "KM",
-    "175": "YT",
-    "178": "CG",
-    "180": "CD",
-    "184": "CK",
-    "188": "CR",
-    "191": "HR",
-    "192": "CU",
-    "196": "CY",
-    "203": "CZ",
-    "204": "BJ",
-    "208": "DK",
-    "212": "DM",
-    "214": "DO",
-    "218": "EC",
-    "222": "SV",
-    "226": "GQ",
-    "230": "ET",
-    "231": "ET",
-    "232": "ER",
-    "233": "EE",
-    "234": "FO",
-    "238": "FK",
-    "239": "GS",
-    "242": "FJ",
-    "246": "FI",
-    "248": "AX",
-    "249": "FR",
-    "250": "FR",
-    "254": "GF",
-    "258": "PF",
-    "260": "TF",
-    "262": "DJ",
-    "266": "GA",
-    "268": "GE",
-    "270": "GM",
-    "275": "PS",
-    "276": "DE",
-    "278": "DE",
-    "280": "DE",
-    "288": "GH",
-    "292": "GI",
-    "296": "KI",
-    "300": "GR",
-    "304": "GL",
-    "308": "GD",
-    "312": "GP",
-    "316": "GU",
-    "320": "GT",
-    "324": "GN",
-    "328": "GY",
-    "332": "HT",
-    "334": "HM",
-    "336": "VA",
-    "340": "HN",
-    "344": "HK",
-    "348": "HU",
-    "352": "IS",
-    "356": "IN",
-    "360": "ID",
-    "364": "IR",
-    "368": "IQ",
-    "372": "IE",
-    "376": "IL",
-    "380": "IT",
-    "384": "CI",
-    "388": "JM",
-    "392": "JP",
-    "398": "KZ",
-    "400": "JO",
-    "404": "KE",
-    "408": "KP",
-    "410": "KR",
-    "414": "KW",
-    "417": "KG",
-    "418": "LA",
-    "422": "LB",
-    "426": "LS",
-    "428": "LV",
-    "430": "LR",
-    "434": "LY",
-    "438": "LI",
-    "440": "LT",
-    "442": "LU",
-    "446": "MO",
-    "450": "MG",
-    "454": "MW",
-    "458": "MY",
-    "462": "MV",
-    "466": "ML",
-    "470": "MT",
-    "474": "MQ",
-    "478": "MR",
-    "480": "MU",
-    "484": "MX",
-    "492": "MC",
-    "496": "MN",
-    "498": "MD",
-    "499": "ME",
-    "500": "MS",
-    "504": "MA",
-    "508": "MZ",
-    "512": "OM",
-    "516": "NA",
-    "520": "NR",
-    "524": "NP",
-    "528": "NL",
-    "531": "CW",
-    "533": "AW",
-    "534": "SX",
-    "535": "BQ",
-    "540": "NC",
-    "548": "VU",
-    "554": "NZ",
-    "558": "NI",
-    "562": "NE",
-    "566": "NG",
-    "570": "NU",
-    "574": "NF",
-    "578": "NO",
-    "580": "MP",
-    "581": "UM",
-    "583": "FM",
-    "584": "MH",
-    "585": "PW",
-    "586": "PK",
-    "591": "PA",
-    "598": "PG",
-    "600": "PY",
-    "604": "PE",
-    "608": "PH",
-    "612": "PN",
-    "616": "PL",
-    "620": "PT",
-    "624": "GW",
-    "626": "TL",
-    "630": "PR",
-    "634": "QA",
-    "638": "RE",
-    "642": "RO",
-    "643": "RU",
-    "646": "RW",
-    "652": "BL",
-    "654": "SH",
-    "659": "KN",
-    "660": "AI",
-    "662": "LC",
-    "663": "MF",
-    "666": "PM",
-    "670": "VC",
-    "674": "SM",
-    "678": "ST",
-    "682": "SA",
-    "686": "SN",
-    "688": "RS",
-    "690": "SC",
-    "694": "SL",
-    "702": "SG",
-    "703": "SK",
-    "704": "VN",
-    "705": "SI",
-    "706": "SO",
-    "710": "ZA",
-    "716": "ZW",
-    "720": "YE",
-    "724": "ES",
-    "728": "SS",
-    "729": "SD",
-    "732": "EH",
-    "736": "SD",
-    "740": "SR",
-    "744": "SJ",
-    "748": "SZ",
-    "752": "SE",
-    "756": "CH",
-    "760": "SY",
-    "762": "TJ",
-    "764": "TH",
-    "768": "TG",
-    "772": "TK",
-    "776": "TO",
-    "780": "TT",
-    "784": "AE",
-    "788": "TN",
-    "792": "TR",
-    "795": "TM",
-    "796": "TC",
-    "798": "TV",
-    "800": "UG",
-    "804": "UA",
-    "807": "MK",
-    "818": "EG",
-    "826": "GB",
-    "830": "JE",
-    "831": "GG",
-    "832": "JE",
-    "833": "IM",
-    "834": "TZ",
-    "840": "US",
-    "850": "VI",
-    "854": "BF",
-    "858": "UY",
-    "860": "UZ",
-    "862": "VE",
-    "876": "WF",
-    "882": "WS",
-    "886": "YE",
-    "887": "YE",
-    "891": "RS",
-    "894": "ZM",
-    "958": "AA",
-    "959": "QM",
-    "960": "QN",
-    "962": "QP",
-    "963": "QQ",
-    "964": "QR",
-    "965": "QS",
-    "966": "QT",
-    "967": "EU",
-    "968": "QV",
-    "969": "QW",
-    "970": "QX",
-    "971": "QY",
-    "972": "QZ",
-    "973": "XA",
-    "974": "XB",
-    "975": "XC",
-    "976": "XD",
-    "977": "XE",
-    "978": "XF",
-    "979": "XG",
-    "980": "XH",
-    "981": "XI",
-    "982": "XJ",
-    "983": "XK",
-    "984": "XL",
-    "985": "XM",
-    "986": "XN",
-    "987": "XO",
-    "988": "XP",
-    "989": "XQ",
-    "990": "XR",
-    "991": "XS",
-    "992": "XT",
-    "993": "XU",
-    "994": "XV",
-    "995": "XW",
-    "996": "XX",
-    "997": "XY",
-    "998": "XZ",
-    "999": "ZZ",
-    "BU": "MM",
-    "CS": "RS",
-    "CT": "KI",
-    "DD": "DE",
-    "DY": "BJ",
-    "FQ": "AQ",
-    "FX": "FR",
-    "HV": "BF",
-    "JT": "UM",
-    "MI": "UM",
-    "NH": "VU",
-    "NQ": "AQ",
-    "PU": "UM",
-    "PZ": "PA",
-    "QU": "EU",
-    "RH": "ZW",
-    "TP": "TL",
-    "UK": "GB",
-    "VD": "VN",
-    "WK": "UM",
-    "YD": "YE",
-    "YU": "RS",
-    "ZR": "CD",
-};
-
-// Region subtags with complex mappings.
-// Derived from CLDR Supplemental Data, version 35.1.
-// https://github.com/unicode-org/cldr.git
-var complexRegionMappings = {
-    "172": true,
-    "200": true,
-    "530": true,
-    "532": true,
-    "536": true,
-    "582": true,
-    "810": true,
-    "890": true,
-    "AN": true,
-    "NT": true,
-    "PC": true,
-    "SU": true,
-};
-
-// Canonicalize Unicode BCP 47 locale identifiers.
-// Derived from CLDR Supplemental Data, version 35.1.
-// https://github.com/unicode-org/cldr.git
-/* eslint-disable complexity */
-function updateLocaleIdMappings(tag) {
-    assert(IsObject(tag), "tag is an object");
-
-    // Replace deprecated language tags with their preferred values.
-    var language = tag.language;
-    if (hasOwn(language, languageMappings)) {
-        tag.language = languageMappings[language];
-    } else if (hasOwn(language, complexLanguageMappings)) {
-        switch (language) {
-          case "cnr":
-            tag.language = "sr";
-            if (tag.region === undefined)
-                tag.region = "ME";
-            break;
-          case "drw":
-          case "prs":
-          case "tnf":
-            tag.language = "fa";
-            if (tag.region === undefined)
-                tag.region = "AF";
-            break;
-          case "hbs":
-          case "sh":
-            tag.language = "sr";
-            if (tag.script === undefined)
-                tag.script = "Latn";
-            break;
-          case "swc":
-            tag.language = "sw";
-            if (tag.region === undefined)
-                tag.region = "CD";
-            break;
-          default:
-            assert(false, "language not handled: " + language);
-        }
-    }
-
-    // No script replacements are currently present.
-
-    // Replace deprecated subtags with their preferred values.
-    var region = tag.region;
-    if (region !== undefined) {
-        if (hasOwn(region, regionMappings)) {
-            tag.region = regionMappings[region];
-        } else if (hasOwn(region, complexRegionMappings)) {
-            switch (region) {
-              case "172":
-                if (tag.language === "ab") {
-                    tag.region = "GE";
-                    break;
-                }
-                if (tag.language === "az") {
-                    tag.region = "AZ";
-                    break;
-                }
-                if (tag.language === "be") {
-                    tag.region = "BY";
-                    break;
-                }
-                if (tag.language === "crh") {
-                    tag.region = "UA";
-                    break;
-                }
-                if (tag.language === "gag") {
-                    tag.region = "MD";
-                    break;
-                }
-                if (tag.language === "got") {
-                    tag.region = "UA";
-                    break;
-                }
-                if (tag.language === "hy") {
-                    tag.region = "AM";
-                    break;
-                }
-                if (tag.language === "ji") {
-                    tag.region = "UA";
-                    break;
-                }
-                if (tag.language === "ka") {
-                    tag.region = "GE";
-                    break;
-                }
-                if (tag.language === "kaa") {
-                    tag.region = "UZ";
-                    break;
-                }
-                if (tag.language === "kk") {
-                    tag.region = "KZ";
-                    break;
-                }
-                if (tag.language === "ky") {
-                    tag.region = "KG";
-                    break;
-                }
-                if (tag.language === "os") {
-                    tag.region = "GE";
-                    break;
-                }
-                if (tag.language === "rue") {
-                    tag.region = "UA";
-                    break;
-                }
-                if (tag.language === "sog") {
-                    tag.region = "UZ";
-                    break;
-                }
-                if (tag.language === "tg") {
-                    tag.region = "TJ";
-                    break;
-                }
-                if (tag.language === "tk") {
-                    tag.region = "TM";
-                    break;
-                }
-                if (tag.language === "tkr") {
-                    tag.region = "AZ";
-                    break;
-                }
-                if (tag.language === "tly") {
-                    tag.region = "AZ";
-                    break;
-                }
-                if (tag.language === "ttt") {
-                    tag.region = "AZ";
-                    break;
-                }
-                if (tag.language === "ug" && tag.script === "Cyrl") {
-                    tag.region = "KZ";
-                    break;
-                }
-                if (tag.language === "uk") {
-                    tag.region = "UA";
-                    break;
-                }
-                if (tag.language === "und" && tag.script === "Armn") {
-                    tag.region = "AM";
-                    break;
-                }
-                if (tag.language === "und" && tag.script === "Sogd") {
-                    tag.region = "UZ";
-                    break;
-                }
-                if (tag.language === "und" && tag.script === "Geor") {
-                    tag.region = "GE";
-                    break;
-                }
-                if (tag.language === "und" && tag.script === "Goth") {
-                    tag.region = "UA";
-                    break;
-                }
-                if (tag.language === "und" && tag.script === "Sogo") {
-                    tag.region = "UZ";
-                    break;
-                }
-                if (tag.language === "uz") {
-                    tag.region = "UZ";
-                    break;
-                }
-                if (tag.language === "xmf") {
-                    tag.region = "GE";
-                    break;
-                }
-                tag.region = "RU";
-                break;
-              case "200":
-                if (tag.language === "sk") {
-                    tag.region = "SK";
-                    break;
-                }
-                tag.region = "CZ";
-                break;
-              case "530":
-              case "532":
-              case "AN":
-                if (tag.language === "vic") {
-                    tag.region = "SX";
-                    break;
-                }
-                tag.region = "CW";
-                break;
-              case "536":
-              case "NT":
-                if (tag.language === "akk") {
-                    tag.region = "IQ";
-                    break;
-                }
-                if (tag.language === "ckb") {
-                    tag.region = "IQ";
-                    break;
-                }
-                if (tag.language === "ku" && tag.script === "Arab") {
-                    tag.region = "IQ";
-                    break;
-                }
-                if (tag.language === "mis") {
-                    tag.region = "IQ";
-                    break;
-                }
-                if (tag.language === "syr") {
-                    tag.region = "IQ";
-                    break;
-                }
-                if (tag.language === "und" && tag.script === "Xsux") {
-                    tag.region = "IQ";
-                    break;
-                }
-                if (tag.language === "und" && tag.script === "Hatr") {
-                    tag.region = "IQ";
-                    break;
-                }
-                if (tag.language === "und" && tag.script === "Syrc") {
-                    tag.region = "IQ";
-                    break;
-                }
-                tag.region = "SA";
-                break;
-              case "582":
-              case "PC":
-                if (tag.language === "mh") {
-                    tag.region = "MH";
-                    break;
-                }
-                if (tag.language === "pau") {
-                    tag.region = "PW";
-                    break;
-                }
-                tag.region = "FM";
-                break;
-              case "810":
-              case "SU":
-                if (tag.language === "ab") {
-                    tag.region = "GE";
-                    break;
-                }
-                if (tag.language === "az") {
-                    tag.region = "AZ";
-                    break;
-                }
-                if (tag.language === "be") {
-                    tag.region = "BY";
-                    break;
-                }
-                if (tag.language === "crh") {
-                    tag.region = "UA";
-                    break;
-                }
-                if (tag.language === "et") {
-                    tag.region = "EE";
-                    break;
-                }
-                if (tag.language === "gag") {
-                    tag.region = "MD";
-                    break;
-                }
-                if (tag.language === "got") {
-                    tag.region = "UA";
-                    break;
-                }
-                if (tag.language === "hy") {
-                    tag.region = "AM";
-                    break;
-                }
-                if (tag.language === "ji") {
-                    tag.region = "UA";
-                    break;
-                }
-                if (tag.language === "ka") {
-                    tag.region = "GE";
-                    break;
-                }
-                if (tag.language === "kaa") {
-                    tag.region = "UZ";
-                    break;
-                }
-                if (tag.language === "kk") {
-                    tag.region = "KZ";
-                    break;
-                }
-                if (tag.language === "ky") {
-                    tag.region = "KG";
-                    break;
-                }
-                if (tag.language === "lt") {
-                    tag.region = "LT";
-                    break;
-                }
-                if (tag.language === "ltg") {
-                    tag.region = "LV";
-                    break;
-                }
-                if (tag.language === "lv") {
-                    tag.region = "LV";
-                    break;
-                }
-                if (tag.language === "os") {
-                    tag.region = "GE";
-                    break;
-                }
-                if (tag.language === "rue") {
-                    tag.region = "UA";
-                    break;
-                }
-                if (tag.language === "sgs") {
-                    tag.region = "LT";
-                    break;
-                }
-                if (tag.language === "sog") {
-                    tag.region = "UZ";
-                    break;
-                }
-                if (tag.language === "tg") {
-                    tag.region = "TJ";
-                    break;
-                }
-                if (tag.language === "tk") {
-                    tag.region = "TM";
-                    break;
-                }
-                if (tag.language === "tkr") {
-                    tag.region = "AZ";
-                    break;
-                }
-                if (tag.language === "tly") {
-                    tag.region = "AZ";
-                    break;
-                }
-                if (tag.language === "ttt") {
-                    tag.region = "AZ";
-                    break;
-                }
-                if (tag.language === "ug" && tag.script === "Cyrl") {
-                    tag.region = "KZ";
-                    break;
-                }
-                if (tag.language === "uk") {
-                    tag.region = "UA";
-                    break;
-                }
-                if (tag.language === "und" && tag.script === "Armn") {
-                    tag.region = "AM";
-                    break;
-                }
-                if (tag.language === "und" && tag.script === "Sogd") {
-                    tag.region = "UZ";
-                    break;
-                }
-                if (tag.language === "und" && tag.script === "Geor") {
-                    tag.region = "GE";
-                    break;
-                }
-                if (tag.language === "und" && tag.script === "Goth") {
-                    tag.region = "UA";
-                    break;
-                }
-                if (tag.language === "und" && tag.script === "Sogo") {
-                    tag.region = "UZ";
-                    break;
-                }
-                if (tag.language === "uz") {
-                    tag.region = "UZ";
-                    break;
-                }
-                if (tag.language === "vro") {
-                    tag.region = "EE";
-                    break;
-                }
-                if (tag.language === "xmf") {
-                    tag.region = "GE";
-                    break;
-                }
-                tag.region = "RU";
-                break;
-              case "890":
-                if (tag.language === "bs") {
-                    tag.region = "BA";
-                    break;
-                }
-                if (tag.language === "hr") {
-                    tag.region = "HR";
-                    break;
-                }
-                if (tag.language === "mk") {
-                    tag.region = "MK";
-                    break;
-                }
-                if (tag.language === "sl") {
-                    tag.region = "SI";
-                    break;
-                }
-                tag.region = "RS";
-                break;
-              default:
-                assert(false, "region not handled: " + region);
-            }
-        }
-
-        // No variant replacements are currently present.
-        // No extension replacements are currently present.
-        // Private use sequences are left as is.
-
-    }
-}
-/* eslint-enable complexity */
-
-// Canonicalize grandfathered locale identifiers.
-// Derived from CLDR Supplemental Data, version 35.1.
-// https://github.com/unicode-org/cldr.git
-function updateGrandfatheredMappings(tag) {
-    assert(IsObject(tag), "tag is an object");
-
-    // We're mapping regular grandfathered tags to non-grandfathered form here.
-    // Other tags remain unchanged.
-    //
-    // regular       = "art-lojban"
-    //               / "cel-gaulish"
-    //               / "no-bok"
-    //               / "no-nyn"
-    //               / "zh-guoyu"
-    //               / "zh-hakka"
-    //               / "zh-min"
-    //               / "zh-min-nan"
-    //               / "zh-xiang"
-    //
-    // Therefore we can quickly exclude most tags by checking every
-    // |unicode_locale_id| subcomponent for characteristics not shared by any of
-    // the regular grandfathered (RG) tags:
-    //
-    //   * Real-world |unicode_language_subtag|s are all two or three letters,
-    //     so don't waste time running a useless |language.length > 3| fast-path.
-    //   * No RG tag has a "script"-looking component.
-    //   * No RG tag has a "region"-looking component.
-    //   * The RG tags that match |unicode_locale_id| (art-lojban, cel-gaulish,
-    //     zh-guoyu, zh-hakka, zh-xiang) have exactly one "variant". (no-bok,
-    //     no-nyn, zh-min, and zh-min-nan require BCP47's extlang subtag
-    //     that |unicode_locale_id| doesn't support.)
-    //   * No RG tag contains |extensions| or |pu_extensions|.
-    if (tag.script !== undefined ||
-        tag.region !== undefined ||
-        tag.variants.length !== 1 ||
-        tag.extensions.length !== 0 ||
-        tag.privateuse !== undefined)
-    {
-        return;
-    }
-
-    // art-lojban -> jbo
-    if (tag.language === "art" && tag.variants[0] === "lojban") {
-        tag.language = "jbo";
-        tag.variants.length = 0;
-    }
-
-    // cel-gaulish -> xtg-x-cel-gaulish
-    else if (tag.language === "cel" && tag.variants[0] === "gaulish") {
-        tag.language = "xtg";
-        tag.variants.length = 0;
-        tag.privateuse = "x-cel-gaulish";
-    }
-
-    // zh-guoyu -> zh
-    else if (tag.language === "zh" && tag.variants[0] === "guoyu") {
-        tag.language = "zh";
-        tag.variants.length = 0;
-    }
-
-    // zh-hakka -> hak
-    else if (tag.language === "zh" && tag.variants[0] === "hakka") {
-        tag.language = "hak";
-        tag.variants.length = 0;
-    }
-
-    // zh-xiang -> hsn
-    else if (tag.language === "zh" && tag.variants[0] === "xiang") {
-        tag.language = "hsn";
-        tag.variants.length = 0;
-    }
-}
deleted file mode 100644
--- a/js/src/builtin/intl/UnicodeExtensionsGenerated.js
+++ /dev/null
@@ -1,371 +0,0 @@
-// Generated by make_intl_data.py. DO NOT EDIT.
-// Version: CLDR-35.1
-// URL: https://unicode.org/Public/cldr/35.1/core.zip
-
-/**
- * Mapping from deprecated BCP 47 Unicode extension types to their preferred
- * values.
- *
- * Spec: https://www.unicode.org/reports/tr35/#Unicode_Locale_Extension_Data_Files
- */
-var deprecatedUnicodeExtensionTypes = {
-    ca: {
-        // Ethiopic calendar, Amete Alem (epoch approx. 5493 B.C.E)
-        "ethiopic-amete-alem": "ethioaa",
-
-        // Civil (algorithmic) Arabic calendar
-        "islamicc": "islamic-civil",
-    },
-    kb: {
-        // The second level to be backwards
-        "yes": "true",
-    },
-    kc: {
-        // The case level is inserted in front of tertiary
-        "yes": "true",
-    },
-    kh: {
-        // Hiragana to be sorted before all non-variable on quaternary level
-        "yes": "true",
-    },
-    kk: {
-        // Convert text into Normalization Form D before calculating collation weights
-        "yes": "true",
-    },
-    kn: {
-        // A sequence of decimal digits is sorted at primary level with its numeric value
-        "yes": "true",
-    },
-    ks: {
-        // The primary level
-        "primary": "level1",
-
-        // The tertiary level
-        "tertiary": "level3",
-    },
-    ms: {
-        // UK System of measurement: feet, pints, etc.; pints are 20oz
-        "imperial": "uksystem",
-    },
-    rg: {
-        "cn11": "cnbj",
-        "cn12": "cntj",
-        "cn13": "cnhe",
-        "cn14": "cnsx",
-        "cn15": "cnmn",
-        "cn21": "cnln",
-        "cn22": "cnjl",
-        "cn23": "cnhl",
-        "cn31": "cnsh",
-        "cn32": "cnjs",
-        "cn33": "cnzj",
-        "cn34": "cnah",
-        "cn35": "cnfj",
-        "cn36": "cnjx",
-        "cn37": "cnsd",
-        "cn41": "cnha",
-        "cn42": "cnhb",
-        "cn43": "cnhn",
-        "cn44": "cngd",
-        "cn45": "cngx",
-        "cn46": "cnhi",
-        "cn50": "cncq",
-        "cn51": "cnsc",
-        "cn52": "cngz",
-        "cn53": "cnyn",
-        "cn54": "cnxz",
-        "cn61": "cnsn",
-        "cn62": "cngs",
-        "cn63": "cnqh",
-        "cn64": "cnnx",
-        "cn65": "cnxj",
-        "cz10a": "cz110",
-        "cz10b": "cz111",
-        "cz10c": "cz112",
-        "cz10d": "cz113",
-        "cz10e": "cz114",
-        "cz10f": "cz115",
-        "cz611": "cz663",
-        "cz612": "cz632",
-        "cz613": "cz633",
-        "cz614": "cz634",
-        "cz615": "cz635",
-        "cz621": "cz641",
-        "cz622": "cz642",
-        "cz623": "cz643",
-        "cz624": "cz644",
-        "cz626": "cz646",
-        "cz627": "cz647",
-        "czjc": "cz31",
-        "czjm": "cz64",
-        "czka": "cz41",
-        "czkr": "cz52",
-        "czli": "cz51",
-        "czmo": "cz80",
-        "czol": "cz71",
-        "czpa": "cz53",
-        "czpl": "cz32",
-        "czpr": "cz10",
-        "czst": "cz20",
-        "czus": "cz42",
-        "czvy": "cz63",
-        "czzl": "cz72",
-        "fra": "frges",
-        "frb": "frnaq",
-        "frc": "frara",
-        "frd": "frbfc",
-        "fre": "frbre",
-        "frf": "frcvl",
-        "frg": "frges",
-        "frh": "frcor",
-        "fri": "frbfc",
-        "frj": "fridf",
-        "frk": "frocc",
-        "frl": "frnaq",
-        "frm": "frges",
-        "frn": "frocc",
-        "fro": "frhdf",
-        "frp": "frnor",
-        "frq": "frnor",
-        "frr": "frpdl",
-        "frs": "frhdf",
-        "frt": "frnaq",
-        "fru": "frpac",
-        "frv": "frara",
-        "laxn": "laxs",
-        "lud": "lucl",
-        "lug": "luec",
-        "lul": "luca",
-        "mrnkc": "mr13",
-        "nzn": "nzauk",
-        "nzs": "nzcan",
-        "omba": "ombj",
-        "omsh": "omsj",
-        "plds": "pl02",
-        "plkp": "pl04",
-        "pllb": "pl08",
-        "plld": "pl10",
-        "pllu": "pl06",
-        "plma": "pl12",
-        "plmz": "pl14",
-        "plop": "pl16",
-        "plpd": "pl20",
-        "plpk": "pl18",
-        "plpm": "pl22",
-        "plsk": "pl26",
-        "plsl": "pl24",
-        "plwn": "pl28",
-        "plwp": "pl30",
-        "plzp": "pl32",
-        "tteto": "tttob",
-        "ttrcm": "ttmrc",
-        "ttwto": "tttob",
-        "twkhq": "twkhh",
-        "twtnq": "twtnn",
-        "twtpq": "twnwt",
-        "twtxq": "twtxg",
-    },
-    sd: {
-        "cn11": "cnbj",
-        "cn12": "cntj",
-        "cn13": "cnhe",
-        "cn14": "cnsx",
-        "cn15": "cnmn",
-        "cn21": "cnln",
-        "cn22": "cnjl",
-        "cn23": "cnhl",
-        "cn31": "cnsh",
-        "cn32": "cnjs",
-        "cn33": "cnzj",
-        "cn34": "cnah",
-        "cn35": "cnfj",
-        "cn36": "cnjx",
-        "cn37": "cnsd",
-        "cn41": "cnha",
-        "cn42": "cnhb",
-        "cn43": "cnhn",
-        "cn44": "cngd",
-        "cn45": "cngx",
-        "cn46": "cnhi",
-        "cn50": "cncq",
-        "cn51": "cnsc",
-        "cn52": "cngz",
-        "cn53": "cnyn",
-        "cn54": "cnxz",
-        "cn61": "cnsn",
-        "cn62": "cngs",
-        "cn63": "cnqh",
-        "cn64": "cnnx",
-        "cn65": "cnxj",
-        "cz10a": "cz110",
-        "cz10b": "cz111",
-        "cz10c": "cz112",
-        "cz10d": "cz113",
-        "cz10e": "cz114",
-        "cz10f": "cz115",
-        "cz611": "cz663",
-        "cz612": "cz632",
-        "cz613": "cz633",
-        "cz614": "cz634",
-        "cz615": "cz635",
-        "cz621": "cz641",
-        "cz622": "cz642",
-        "cz623": "cz643",
-        "cz624": "cz644",
-        "cz626": "cz646",
-        "cz627": "cz647",
-        "czjc": "cz31",
-        "czjm": "cz64",
-        "czka": "cz41",
-        "czkr": "cz52",
-        "czli": "cz51",
-        "czmo": "cz80",
-        "czol": "cz71",
-        "czpa": "cz53",
-        "czpl": "cz32",
-        "czpr": "cz10",
-        "czst": "cz20",
-        "czus": "cz42",
-        "czvy": "cz63",
-        "czzl": "cz72",
-        "fra": "frges",
-        "frb": "frnaq",
-        "frc": "frara",
-        "frd": "frbfc",
-        "fre": "frbre",
-        "frf": "frcvl",
-        "frg": "frges",
-        "frh": "frcor",
-        "fri": "frbfc",
-        "frj": "fridf",
-        "frk": "frocc",
-        "frl": "frnaq",
-        "frm": "frges",
-        "frn": "frocc",
-        "fro": "frhdf",
-        "frp": "frnor",
-        "frq": "frnor",
-        "frr": "frpdl",
-        "frs": "frhdf",
-        "frt": "frnaq",
-        "fru": "frpac",
-        "frv": "frara",
-        "laxn": "laxs",
-        "lud": "lucl",
-        "lug": "luec",
-        "lul": "luca",
-        "mrnkc": "mr13",
-        "nzn": "nzauk",
-        "nzs": "nzcan",
-        "omba": "ombj",
-        "omsh": "omsj",
-        "plds": "pl02",
-        "plkp": "pl04",
-        "pllb": "pl08",
-        "plld": "pl10",
-        "pllu": "pl06",
-        "plma": "pl12",
-        "plmz": "pl14",
-        "plop": "pl16",
-        "plpd": "pl20",
-        "plpk": "pl18",
-        "plpm": "pl22",
-        "plsk": "pl26",
-        "plsl": "pl24",
-        "plwn": "pl28",
-        "plwp": "pl30",
-        "plzp": "pl32",
-        "tteto": "tttob",
-        "ttrcm": "ttmrc",
-        "ttwto": "tttob",
-        "twkhq": "twkhh",
-        "twtnq": "twtnn",
-        "twtpq": "twnwt",
-        "twtxq": "twtxg",
-    },
-    tz: {
-        // Amundsen-Scott Station, South Pole
-        "aqams": "nzakl",
-
-        // Chongqing, China
-        "cnckg": "cnsha",
-
-        // Harbin, China
-        "cnhrb": "cnsha",
-
-        // Kashgar, China
-        "cnkhg": "cnurc",
-
-        // Havana, Cuba
-        "cuba": "cuhav",
-
-        // Cairo, Egypt
-        "egypt": "egcai",
-
-        // Dublin, Ireland
-        "eire": "iedub",
-
-        // 5 hours behind UTC
-        "est": "utcw05",
-
-        // Greenwich Mean Time
-        "gmt0": "gmt",
-
-        // Hong Kong SAR China
-        "hongkong": "hkhkg",
-
-        // 10 hours behind UTC
-        "hst": "utcw10",
-
-        // Reykjavik, Iceland
-        "iceland": "isrey",
-
-        // Tehran, Iran
-        "iran": "irthr",
-
-        // Jerusalem
-        "israel": "jeruslm",
-
-        // Jamaica
-        "jamaica": "jmkin",
-
-        // Tokyo, Japan
-        "japan": "jptyo",
-
-        // Tripoli, Libya
-        "libya": "lytip",
-
-        // 7 hours behind UTC
-        "mst": "utcw07",
-
-        // Denver, United States
-        "navajo": "usden",
-
-        // Warsaw, Poland
-        "poland": "plwaw",
-
-        // Lisbon, Portugal
-        "portugal": "ptlis",
-
-        // Shanghai, China
-        "prc": "cnsha",
-
-        // Taipei, Taiwan
-        "roc": "twtpe",
-
-        // Seoul, South Korea
-        "rok": "krsel",
-
-        // Istanbul, Turkey
-        "turkey": "trist",
-
-        // UTC (Coordinated Universal Time)
-        "uct": "utc",
-
-        // Shiprock (Navajo), United States
-        "usnavajo": "usden",
-
-        // UTC (Coordinated Universal Time)
-        "zulu": "utc",
-    },
-};
--- a/js/src/builtin/intl/make_intl_data.py
+++ b/js/src/builtin/intl/make_intl_data.py
@@ -9,19 +9,19 @@
     make_intl_data.py langtags [ldmlSupplemental.dtd supplementalMetadata.xml likelySubtags.xml]
     make_intl_data.py tzdata
     make_intl_data.py currency
     make_intl_data.py unicode-ext
 
 
     Target "langtags":
     This script extracts information about mappings between deprecated and
-    current Unicode BCP 47 locale identifiers from CLDR and converts it to
-    JavaScript object definitions in LangTagMappingsGenerated.js. The
-    definitions are used in Intl.js.
+    current Unicode BCP 47 locale identifiers from CLDR and converts it to C++
+    mapping code in LanguageTagGenerated.cpp. The code is used in
+    LanguageTag.cpp.
 
 
     Target "tzdata":
     This script computes which time zone informations are not up-to-date in ICU
     and provides the necessary mappings to workaround this problem.
     https://ssl.icu-project.org/trac/ticket/12044
 
 
@@ -100,303 +100,16 @@ def writeMappingsVar(println, mapping, n
             if key != preferred:
                 raise Exception(
                     "Expected '{0}' matches preferred locale '{1}'".format(key, preferred))
             value = '"{0}"'.format(prefix)
         println(u'    "{0}": {1},'.format(key, value))
     println(u"};")
 
 
-def writeUpdateLocaleIdMappingsFunction(println,
-                                        complex_language_mappings,
-                                        complex_region_mappings,
-                                        description, source, url):
-    """ Writes a function definition that performs language tag mapping. """
-    println(u"")
-    writeMappingHeader(println, description, source, url)
-    println(u"""\
-/* eslint-disable complexity */
-function updateLocaleIdMappings(tag) {
-    assert(IsObject(tag), "tag is an object");
-
-    // Replace deprecated language tags with their preferred values.
-    var language = tag.language;
-    if (hasOwn(language, languageMappings)) {
-        tag.language = languageMappings[language];
-    } else if (hasOwn(language, complexLanguageMappings)) {
-        switch (language) {""")
-
-    # Merge duplicate language entries.
-    language_aliases = {}
-    for (deprecated_language, (language, script, region)) in (
-        sorted(complex_language_mappings.items(), key=itemgetter(0))
-    ):
-        key = (language, script, region)
-        if key not in language_aliases:
-            language_aliases[key] = []
-        else:
-            language_aliases[key].append(deprecated_language)
-
-    for (deprecated_language, (language, script, region)) in (
-        sorted(complex_language_mappings.items(), key=itemgetter(0))
-    ):
-        key = (language, script, region)
-        if deprecated_language in language_aliases[key]:
-            continue
-
-        for lang in [deprecated_language] + language_aliases[key]:
-            println(u"""
-          case "{}":
-            """.format(lang).rstrip().strip("\n"))
-
-        println(u"""
-            tag.language = "{}";
-        """.format(language).rstrip().strip("\n"))
-        if script is not None:
-            println(u"""
-            if (tag.script === undefined)
-                tag.script = "{}";
-            """.format(script).rstrip().strip("\n"))
-        if region is not None:
-            println(u"""
-            if (tag.region === undefined)
-                tag.region = "{}";
-            """.format(region).rstrip().strip("\n"))
-        println(u"""
-            break;
-        """.rstrip().strip("\n"))
-
-    println(u"""
-          default:
-            assert(false, "language not handled: " + language);
-        }
-    }
-
-    // No script replacements are currently present.
-
-    // Replace deprecated subtags with their preferred values.
-    var region = tag.region;
-    if (region !== undefined) {
-        if (hasOwn(region, regionMappings)) {
-            tag.region = regionMappings[region];
-        } else if (hasOwn(region, complexRegionMappings)) {
-            switch (region) {""".lstrip("\n"))
-
-    # |non_default_replacements| is a list and hence not hashable. Convert it
-    # to a string to get a proper hashable value.
-    def hash_key(default, non_default_replacements):
-        return (default, str(sorted(str(v) for v in non_default_replacements)))
-
-    # Merge duplicate region entries.
-    region_aliases = {}
-    for (deprecated_region, (default, non_default_replacements)) in (
-        sorted(complex_region_mappings.items(), key=itemgetter(0))
-    ):
-        key = hash_key(default, non_default_replacements)
-        if key not in region_aliases:
-            region_aliases[key] = []
-        else:
-            region_aliases[key].append(deprecated_region)
-
-    for (deprecated_region, (default, non_default_replacements)) in (
-        sorted(complex_region_mappings.items(), key=itemgetter(0))
-    ):
-        key = hash_key(default, non_default_replacements)
-        if deprecated_region in region_aliases[key]:
-            continue
-
-        for region in [deprecated_region] + region_aliases[key]:
-            println(u"""
-              case "{}":
-            """.format(region).rstrip().strip("\n"))
-
-        for (language, script, region) in sorted(non_default_replacements, key=itemgetter(0)):
-            if script is None:
-                println(u"""
-                if (tag.language === "{}") {{
-                """.format(language).rstrip().strip("\n"))
-            else:
-                println(u"""
-                if (tag.language === "{}" && tag.script === "{}") {{
-                """.format(language, script).rstrip().strip("\n"))
-            println(u"""
-                    tag.region = "{}";
-                    break;
-                }}
-            """.format(region).rstrip().strip("\n"))
-
-        println(u"""
-                tag.region = "{}";
-                break;
-        """.format(default).rstrip().strip("\n"))
-
-    println(u"""
-              default:
-                assert(false, "region not handled: " + region);
-            }
-        }
-
-        // No variant replacements are currently present.
-        // No extension replacements are currently present.
-        // Private use sequences are left as is.
-
-    }
-}
-/* eslint-enable complexity */
-""".strip("\n"))
-
-
-def writeGrandfatheredMappingsFunction(println,
-                                       grandfathered_mappings,
-                                       description, source, url):
-    """ Writes a function definition that maps grandfathered language tags. """
-    println(u"")
-    writeMappingHeader(println, description, source, url)
-    println(u"""\
-function updateGrandfatheredMappings(tag) {
-    assert(IsObject(tag), "tag is an object");
-
-    // We're mapping regular grandfathered tags to non-grandfathered form here.
-    // Other tags remain unchanged.
-    //
-    // regular       = "art-lojban"
-    //               / "cel-gaulish"
-    //               / "no-bok"
-    //               / "no-nyn"
-    //               / "zh-guoyu"
-    //               / "zh-hakka"
-    //               / "zh-min"
-    //               / "zh-min-nan"
-    //               / "zh-xiang"
-    //
-    // Therefore we can quickly exclude most tags by checking every
-    // |unicode_locale_id| subcomponent for characteristics not shared by any of
-    // the regular grandfathered (RG) tags:
-    //
-    //   * Real-world |unicode_language_subtag|s are all two or three letters,
-    //     so don't waste time running a useless |language.length > 3| fast-path.
-    //   * No RG tag has a "script"-looking component.
-    //   * No RG tag has a "region"-looking component.
-    //   * The RG tags that match |unicode_locale_id| (art-lojban, cel-gaulish,
-    //     zh-guoyu, zh-hakka, zh-xiang) have exactly one "variant". (no-bok,
-    //     no-nyn, zh-min, and zh-min-nan require BCP47's extlang subtag
-    //     that |unicode_locale_id| doesn't support.)
-    //   * No RG tag contains |extensions| or |pu_extensions|.
-    if (tag.script !== undefined ||
-        tag.region !== undefined ||
-        tag.variants.length !== 1 ||
-        tag.extensions.length !== 0 ||
-        tag.privateuse !== undefined)
-    {
-        return;
-    }""")
-
-    # From Unicode BCP 47 locale identifier <https://unicode.org/reports/tr35/>.
-    #
-    # Doesn't allow any 'extensions' subtags.
-    re_unicode_locale_id = re.compile(
-        r"""
-        ^
-        # unicode_language_id = unicode_language_subtag
-        #     unicode_language_subtag = alpha{2,3} | alpha{5,8}
-        (?P<language>[a-z]{2,3}|[a-z]{5,8})
-
-        # (sep unicode_script_subtag)?
-        #     unicode_script_subtag = alpha{4}
-        (?:-(?P<script>[a-z]{4}))?
-
-        # (sep unicode_region_subtag)?
-        #     unicode_region_subtag = (alpha{2} | digit{3})
-        (?:-(?P<region>([a-z]{2}|[0-9]{3})))?
-
-        # (sep unicode_variant_subtag)*
-        #     unicode_variant_subtag = (alphanum{5,8} | digit alphanum{3})
-        (?P<variants>(-([a-z0-9]{5,8}|[0-9][a-z0-9]{3}))+)?
-
-        # pu_extensions?
-        #     pu_extensions = sep [xX] (sep alphanum{1,8})+
-        (?:-(?P<privateuse>x(-[a-z0-9]{1,8})+))?
-        $
-        """, re.IGNORECASE | re.VERBOSE)
-
-    is_first = True
-
-    for (tag, modern) in sorted(grandfathered_mappings.items(), key=itemgetter(0)):
-        tag_match = re_unicode_locale_id.match(tag)
-        assert tag_match is not None
-
-        tag_language = tag_match.group("language")
-        assert tag_match.group("script") is None, (
-               "{} does not contain a script subtag".format(tag))
-        assert tag_match.group("region") is None, (
-               "{} does not contain a region subtag".format(tag))
-        tag_variants = tag_match.group("variants")
-        assert tag_variants is not None, (
-               "{} contains a variant subtag".format(tag))
-        assert tag_match.group("privateuse") is None, (
-               "{} does not contain a privateuse subtag".format(tag))
-
-        tag_variant = tag_variants[1:]
-        assert "-" not in tag_variant, (
-               "{} contains only a single variant".format(tag))
-
-        modern_match = re_unicode_locale_id.match(modern)
-        assert modern_match is not None
-
-        modern_language = modern_match.group("language")
-        modern_script = modern_match.group("script")
-        modern_region = modern_match.group("region")
-        modern_variants = modern_match.group("variants")
-        modern_privateuse = modern_match.group("privateuse")
-
-        println(u"""
-    // {} -> {}
-""".format(tag, modern).rstrip())
-
-        println(u"""
-    {}if (tag.language === "{}" && tag.variants[0] === "{}") {{
-        """.format("" if is_first else "else ", tag_language, tag_variant).rstrip().strip("\n"))
-
-        is_first = False
-
-        println(u"""
-        tag.language = "{}";
-        """.format(modern_language).rstrip().strip("\n"))
-
-        if modern_script is not None:
-            println(u"""
-        tag.script = "{}";
-        """.format(modern_script).rstrip().strip("\n"))
-
-        if modern_region is not None:
-            println(u"""
-        tag.region = "{}";
-        """.format(modern_region).rstrip().strip("\n"))
-
-        if modern_variants is not None:
-            println(u"""
-        tag.variants = {};
-        """.format(sorted(modern_variants[1:].split("-"))).rstrip().strip("\n"))
-        else:
-            println(u"""
-        tag.variants.length = 0;
-        """.rstrip().strip("\n"))
-
-        if modern_privateuse is not None:
-            println(u"""
-        tag.privateuse = "{}";
-        """.format(modern_privateuse).rstrip().strip("\n"))
-
-        println(u"""
-    }""".rstrip().strip("\n"))
-
-    println(u"""
-}""".lstrip("\n"))
-
-
 def writeMappingsBinarySearch(println, fn_name, type_name, name, validate_fn, mappings,
                               tag_maxlength, description, source, url):
     """ Emit code to perform a binary search on language tag subtags.
 
         Uses the contents of |mapping|, which can either be a dictionary or set,
         to emit a mapping function to find subtag replacements.
     """
     println(u"")
@@ -503,18 +216,18 @@ bool js::intl::LanguageTag::{0}({1} {2})
     if trailing_return:
         println(u"""
   return false;""")
 
     println(u"""
 }""".lstrip("\n"))
 
 
-def writeComplexLanguageTagMappingsNative(println, complex_language_mappings,
-                                          description, source, url):
+def writeComplexLanguageTagMappings(println, complex_language_mappings,
+                                    description, source, url):
     println(u"")
     writeMappingHeader(println, description, source, url)
     println(u"""
 void js::intl::LanguageTag::performComplexLanguageMappings() {
   MOZ_ASSERT(IsStructurallyValidLanguageTag(language().range()));
 """.lstrip())
 
     # Merge duplicate language entries.
@@ -562,18 +275,18 @@ void js::intl::LanguageTag::performCompl
         println(u"""
   }""".strip("\n"))
 
     println(u"""
 }
 """.strip("\n"))
 
 
-def writeComplexRegionTagMappingsNative(println, complex_region_mappings,
-                                        description, source, url):
+def writeComplexRegionTagMappings(println, complex_region_mappings,
+                                  description, source, url):
     println(u"")
     writeMappingHeader(println, description, source, url)
     println(u"""
 void js::intl::LanguageTag::performComplexRegionMappings() {
   MOZ_ASSERT(IsStructurallyValidLanguageTag(language().range()));
   MOZ_ASSERT(IsStructurallyValidRegionTag(region().range()));
 """.lstrip())
 
@@ -646,18 +359,18 @@ void js::intl::LanguageTag::performCompl
     }}
   }}""".format(default).rstrip().strip("\n"))
 
     println(u"""
 }
 """.strip("\n"))
 
 
-def writeGrandfatheredMappingsFunctionNative(println, grandfathered_mappings,
-                                             description, source, url):
+def writeGrandfatheredMappingsFunction(println, grandfathered_mappings,
+                                       description, source, url):
     """ Writes a function definition that maps grandfathered language tags. """
     println(u"")
     writeMappingHeader(println, description, source, url)
     println(u"""\
 bool js::intl::LanguageTag::updateGrandfatheredMappings(JSContext* cx) {
   // We're mapping regular grandfathered tags to non-grandfathered form here.
   // Other tags remain unchanged.
   //
@@ -1062,48 +775,16 @@ def readSupplementalData(supplemental_dt
             "complexRegionMappings": complex_region_mappings_final,
             "likelySubtags": likely_subtags,
             }
 
 
 def writeCLDRLanguageTagData(println, data, url):
     """ Writes the language tag data to the Intl data file. """
 
-    source = u"CLDR Supplemental Data, version {}".format(data["version"])
-    grandfathered_mappings = data["grandfatheredMappings"]
-    language_mappings = data["languageMappings"]
-    complex_language_mappings = data["complexLanguageMappings"]
-    region_mappings = data["regionMappings"]
-    complex_region_mappings = data["complexRegionMappings"]
-
-    writeMappingsVar(println, grandfathered_mappings, "grandfatheredMappings",
-                     "Mappings from grandfathered tags to preferred values.", source, url)
-    writeMappingsVar(println, language_mappings, "languageMappings",
-                     "Mappings from language subtags to preferred values.", source, url)
-    writeMappingsVar(println, {key: True for key in complex_language_mappings},
-                     "complexLanguageMappings",
-                     "Language subtags with complex mappings.", source, url)
-    writeMappingsVar(println, region_mappings, "regionMappings",
-                     "Mappings from region subtags to preferred values.", source, url)
-    writeMappingsVar(println, {key: True for key in complex_region_mappings},
-                     "complexRegionMappings",
-                     "Region subtags with complex mappings.", source, url)
-
-    writeUpdateLocaleIdMappingsFunction(println, complex_language_mappings,
-                                        complex_region_mappings,
-                                        "Canonicalize Unicode BCP 47 locale identifiers.",
-                                        source, url)
-    writeGrandfatheredMappingsFunction(println, grandfathered_mappings,
-                                       "Canonicalize grandfathered locale identifiers.",
-                                       source, url)
-
-
-def writeCLDRLanguageTagDataNative(println, data, url):
-    """ Writes the language tag data to the Intl data file. """
-
     println(generatedFileWarning)
 
     println(u"""
 #include "mozilla/Assertions.h"
 #include "mozilla/Range.h"
 #include "mozilla/TextUtils.h"
 
 #include <algorithm>
@@ -1181,24 +862,24 @@ static inline const char* SearchReplacem
                               region_mappings, region_maxlength,
                               "Mappings from region subtags to preferred values.", source, url)
     writeMappingsBinarySearch(println, "complexRegionMapping",
                               "const RegionSubtag&", "region",
                               "IsStructurallyValidRegionTag",
                               complex_region_mappings.keys(), region_maxlength,
                               "Region subtags with complex mappings.", source, url)
 
-    writeComplexLanguageTagMappingsNative(println, complex_language_mappings,
-                                          "Language subtags with complex mappings.", source, url)
-    writeComplexRegionTagMappingsNative(println, complex_region_mappings,
-                                        "Region subtags with complex mappings.", source, url)
-
-    writeGrandfatheredMappingsFunctionNative(println, grandfathered_mappings,
-                                             "Canonicalize grandfathered locale identifiers.", source,
-                                             url)
+    writeComplexLanguageTagMappings(println, complex_language_mappings,
+                                    "Language subtags with complex mappings.", source, url)
+    writeComplexRegionTagMappings(println, complex_region_mappings,
+                                  "Region subtags with complex mappings.", source, url)
+
+    writeGrandfatheredMappingsFunction(println, grandfathered_mappings,
+                                       "Canonicalize grandfathered locale identifiers.", source,
+                                       url)
 
 
 def writeCLDRLanguageTagLikelySubtagsTest(println, data, url):
     """ Writes the likely-subtags test file. """
 
     source = u"CLDR Supplemental Data, version {}".format(data["version"])
     language_mappings = data["languageMappings"]
     complex_language_mappings = data["complexLanguageMappings"]
@@ -1317,17 +998,17 @@ for (let [tag, minimal] of Object.entrie
 }""")
 
     println(u"""
 if (typeof reportCompare === "function")
     reportCompare(0, 0);""")
 
 
 def updateCLDRLangTags(args):
-    """ Update the LangTagMappingsCLDRGenerated.js file. """
+    """ Update the LanguageTagGenerated.cpp file. """
     url = args.url
     branch = args.branch
     revision = args.revision
     out = args.out
     files = args.files
 
     print("Arguments:")
     print("\tDownload url: %s" % url)
@@ -1399,27 +1080,18 @@ def updateCLDRLangTags(args):
     print("Processing CLDR supplemental data...")
     data = readSupplementalData(supplemental_dtd_file,
                                 supplemental_metadata_file,
                                 likely_subtags_file)
 
     print("Writing Intl data...")
     with io.open(out, mode="w", encoding="utf-8", newline="") as f:
         println = partial(print, file=f)
-
-        println(u"// Generated by make_intl_data.py. DO NOT EDIT.")
         writeCLDRLanguageTagData(println, data, url)
 
-    print("Writing Intl data...")
-    native_out = "LanguageTagGenerated.cpp"
-    # native_out = os.path.splitext(out)[0] + ".cpp"
-    with io.open(native_out, mode="w", encoding="utf-8", newline="") as f:
-        println = partial(print, file=f)
-        writeCLDRLanguageTagDataNative(println, data, url)
-
     print("Writing Intl test data...")
     test_file = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                              "../../tests/non262/Intl/Locale/likely-subtags-generated.js")
     with io.open(test_file, mode="w", encoding="utf-8", newline="") as f:
         println = partial(print, file=f)
 
         println(u"// |reftest| skip-if(!this.hasOwnProperty('Intl')||"
                 u"(!this.Intl.Locale&&!this.hasOwnProperty('addIntlExtras')))")
@@ -2691,17 +2363,17 @@ if __name__ == "__main__":
                                   metavar="URL",
                                   default="https://github.com/unicode-org/cldr.git",
                                   help="URL to git repository (default: %(default)s)")
     parser_cldr_tags.add_argument("--branch", default="latest",
                                   help="Git branch (default: %(default)s)")
     parser_cldr_tags.add_argument("--revision", default="HEAD",
                                   help="Git revision (default: %(default)s)")
     parser_cldr_tags.add_argument("--out",
-                                  default="LangTagMappingsGenerated.js",
+                                  default="LanguageTagGenerated.cpp",
                                   help="Output file (default: %(default)s)")
     parser_cldr_tags.add_argument("files",
                                   nargs="*",
                                   help="Local ldmlSupplemental.dtd, supplementalMetadata.xml, "
                                        "and likelySubtags.xml files, if omitted uses <URL>")
     parser_cldr_tags.set_defaults(func=updateCLDRLangTags)
 
     parser_tz = subparsers.add_parser("tzdata", help="Update tzdata")
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -476,21 +476,19 @@ selfhosted_inputs = [
     'builtin/WeakMap.js',
     'builtin/WeakSet.js'
 ] + ([
     'builtin/intl/Collator.js',
     'builtin/intl/CommonFunctions.js',
     'builtin/intl/CurrencyDataGenerated.js',
     'builtin/intl/DateTimeFormat.js',
     'builtin/intl/IntlObject.js',
-    'builtin/intl/LangTagMappingsGenerated.js',
     'builtin/intl/NumberFormat.js',
     'builtin/intl/PluralRules.js',
     'builtin/intl/RelativeTimeFormat.js',
-    'builtin/intl/UnicodeExtensionsGenerated.js',
 ] if CONFIG['ENABLE_INTL_API'] else [])
 
 # Prepare self-hosted JS code for embedding
 GeneratedFile('selfhosted.out.h', 'selfhosted.js',
               script='builtin/embedjs.py',
               entry_point='generate_selfhosted',
               inputs=selfhosted_inputs)