[v8-test262-automation] Changes from https://github.com/v8/v8.git at sha 9583858e on Mon Dec 10 2018 19:17:52 GMT+0000 (Coordinated Universal Time)

This commit is contained in:
test262-automation 2018-12-10 19:18:21 +00:00
parent 8e3c6d0484
commit ae464533ad
70 changed files with 378 additions and 1064 deletions

View File

@ -37,9 +37,6 @@ assertFalse(options.locale === 'und');
assertFalse(options.locale === '');
assertFalse(options.locale === undefined);
// Then check for legitimacy.
assertLanguageTag(%GetDefaultICULocale(), options.locale);
var iteratorNone = new Intl.v8BreakIterator();
assertEquals(options.locale, iteratorNone.resolvedOptions().locale);

View File

@ -1,32 +0,0 @@
// Copyright 2013 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Passing a well formed but unsupported locale falls back to default.
var iterator = Intl.v8BreakIterator(['xx']);
assertLanguageTag(%GetDefaultICULocale(), iterator.resolvedOptions().locale);

View File

@ -37,9 +37,6 @@ assertFalse(options.locale === 'und');
assertFalse(options.locale === '');
assertFalse(options.locale === undefined);
// Then check for legitimacy.
assertLanguageTag(%GetDefaultICULocale(), options.locale);
var collatorNone = new Intl.Collator();
assertEquals(options.locale, collatorNone.resolvedOptions().locale);
@ -49,5 +46,4 @@ assertEquals(options.locale, collatorBraket.resolvedOptions().locale);
var collatorWithOptions = new Intl.Collator(undefined, {usage: 'search'});
var locale = collatorWithOptions.resolvedOptions().locale;
assertLanguageTag(%GetDefaultICULocale(), locale);
assertEquals(locale.indexOf('-co-search'), -1);

View File

@ -5,14 +5,12 @@
// No locale
var collatorWithOptions = new Intl.Collator(undefined);
var { locale, usage, collation } = collatorWithOptions.resolvedOptions();
assertLanguageTag(%GetDefaultICULocale(), locale);
assertEquals('sort', usage);
assertEquals('default', collation);
assertEquals(locale.indexOf('-co-search'), -1);
collatorWithOptions = new Intl.Collator(undefined, {usage: 'sort'});
var { locale, usage, collation } = collatorWithOptions.resolvedOptions();
assertLanguageTag(%GetDefaultICULocale(), locale);
assertEquals('sort', usage);
assertEquals('default', collation);
assertEquals(locale.indexOf('-co-search'), -1);
@ -21,12 +19,10 @@ collatorWithOptions = new Intl.Collator(undefined, {usage: 'search'});
var { locale, usage, collation } = collatorWithOptions.resolvedOptions();
assertEquals('search', usage);
assertEquals('default', collation);
assertLanguageTag(%GetDefaultICULocale(), locale);
assertEquals(locale.indexOf('-co-search'), -1);
collatorWithOptions = new Intl.Collator(locale);
var { locale, usage, collation } = collatorWithOptions.resolvedOptions();
assertLanguageTag(%GetDefaultICULocale(), locale);
assertEquals('sort', usage);
assertEquals('default', collation);
assertEquals(locale.indexOf('-co-search'), -1);

View File

@ -1,32 +0,0 @@
// Copyright 2013 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Passing a well formed but unsupported locale falls back to default.
var collator = Intl.Collator(['xx']);
assertLanguageTag(%GetDefaultICULocale(), collator.resolvedOptions().locale);

View File

@ -37,8 +37,5 @@ assertFalse(options.locale === 'und');
assertFalse(options.locale === '');
assertFalse(options.locale === undefined);
// Then check for legitimacy.
assertLanguageTag(%GetDefaultICULocale(), options.locale);
var dtfNone = new Intl.DateTimeFormat();
assertEquals(options.locale, dtfNone.resolvedOptions().locale);

View File

@ -1,32 +0,0 @@
// Copyright 2013 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Passing a well formed but unsupported locale falls back to default.
var dtf = Intl.DateTimeFormat(['xx']);
assertLanguageTag(%GetDefaultICULocale(), dtf.resolvedOptions().locale);

View File

@ -0,0 +1,17 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Environment Variables: LC_ALL=de
assertEquals("de", (new Intl.Collator([])).resolvedOptions().locale);
assertEquals("de", (new Intl.Collator(['xx'])).resolvedOptions().locale);
assertEquals("de", (new Intl.Collator(undefined)).resolvedOptions().locale);
assertEquals("de", (new Intl.Collator(undefined, {usage: 'sort'})).resolvedOptions().locale);
assertEquals("de", (new Intl.Collator(undefined, {usage: 'search'})).resolvedOptions().locale);
assertEquals("de", (new Intl.DateTimeFormat([])).resolvedOptions().locale);
assertEquals("de", (new Intl.DateTimeFormat(['xx'])).resolvedOptions().locale);
assertEquals("de", (new Intl.NumberFormat([])).resolvedOptions().locale);
assertEquals("de", (new Intl.NumberFormat(['xx'])).resolvedOptions().locale);
assertEquals("de", (new Intl.v8BreakIterator([])).resolvedOptions().locale);
assertEquals("de", (new Intl.v8BreakIterator(['xx'])).resolvedOptions().locale);

View File

@ -29,6 +29,9 @@
[ALWAYS, {
# TODO(jochen): The following test is flaky.
'overrides/caching': [PASS, FAIL],
# https://crbug.com/v8/8469
'regress-8469': [FAIL],
}], # ALWAYS
['variant == no_wasm_traps', {
@ -39,14 +42,18 @@
# noi18n cannot turn on ICU backend for Date
'relative-time-format/default-locale-fr-CA': [SKIP],
'relative-time-format/default-locale-pt-BR': [SKIP],
# Unable to change locale on Windows:
'default_locale': [SKIP],
}], # system == windows'
['system == android', {
# Android's ICU data file does not have the Chinese/Japanese dictionary
# required for the test to pass.
'break-iterator/zh-break': [FAIL],
'break-iterator/zh-break': [SKIP],
# Unable to change locale on Android:
'relative-time-format/default-locale-fr-CA': [FAIL],
'relative-time-format/default-locale-pt-BR': [FAIL],
'relative-time-format/default-locale-fr-CA': [SKIP],
'relative-time-format/default-locale-pt-BR': [SKIP],
'default_locale': [SKIP],
}], # 'system == android'
]

View File

@ -37,8 +37,5 @@ assertFalse(options.locale === 'und');
assertFalse(options.locale === '');
assertFalse(options.locale === undefined);
// Then check for legitimacy.
assertLanguageTag(%GetDefaultICULocale(), options.locale);
var nfNone = new Intl.NumberFormat();
assertEquals(options.locale, nfNone.resolvedOptions().locale);

View File

@ -1,32 +0,0 @@
// Copyright 2013 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Passing a well formed but unsupported locale falls back to default.
var nf = Intl.NumberFormat(['xx']);
assertLanguageTag(%GetDefaultICULocale(), nf.resolvedOptions().locale);

View File

@ -1,806 +0,0 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-intl-segmenter --harmony-intl-list-format --harmony-locale
let locales = [
"af-NA",
"af",
"af-ZA",
"agq-CM",
"agq",
"ak-GH",
"ak",
"am-ET",
"am",
"an",
"ar-001",
"ar-AE",
"ar-BH",
"ar-DJ",
"ar-DZ",
"ar-EG",
"ar-EH",
"ar-ER",
"ar-IL",
"ar-IQ",
"ar-JO",
"ar-KM",
"ar-KW",
"ar-LB",
"ar-LY",
"ar-MA",
"ar-MR",
"ar-OM",
"ar-PS",
"ar-QA",
"ar-SA",
"ar-SD",
"ar-SO",
"ar-SS",
"ars",
"ar-SY",
"ar-TD",
"ar-TN",
"ar",
"ar-YE",
"asa",
"asa-TZ",
"as-IN",
"ast-ES",
"ast",
"as",
"az-AZ",
"az-Cyrl-AZ",
"az-Cyrl",
"az-Latn-AZ",
"az-Latn",
"az",
"bas-CM",
"bas",
"be-BY",
"bem",
"bem-ZM",
"be",
"bez",
"bez-TZ",
"bg-BG",
"bg",
"bm-ML",
"bm",
"bn-BD",
"bn-IN",
"bn",
"bo-CN",
"bo-IN",
"bo",
"br-FR",
"br",
"brx-IN",
"brx",
"bs-BA",
"bs-Cyrl-BA",
"bs-Cyrl",
"bs-Latn-BA",
"bs-Latn",
"bs",
"ca-AD",
"ca-ES",
"ca-FR",
"ca-IT",
"ca",
"ccp-BD",
"ccp-IN",
"ccp",
"ce-RU",
"ce",
"cgg",
"cgg-UG",
"chr",
"chr-US",
"ckb-IQ",
"ckb-IR",
"ckb",
"cs-CZ",
"cs",
"cy-GB",
"cy",
"da-DK",
"da-GL",
"da",
"dav-KE",
"dav",
"de-AT",
"de-BE",
"de-CH",
"de-DE",
"de-IT",
"de-LI",
"de-LU",
"de",
"dje-NE",
"dje",
"dsb-DE",
"dsb",
"dua-CM",
"dua",
"dyo-SN",
"dyo",
"dz-BT",
"dz",
"ebu-KE",
"ebu",
"ee-GH",
"ee-TG",
"ee",
"el-CY",
"el-GR",
"el",
"en-001",
"en-150",
"en-AG",
"en-AI",
"en-AS",
"en-AT",
"en-AU",
"en-BB",
"en-BE",
"en-BI",
"en-BM",
"en-BS",
"en-BW",
"en-BZ",
"en-CA",
"en-CC",
"en-CH",
"en-CK",
"en-CM",
"en-CX",
"en-CY",
"en-DE",
"en-DG",
"en-DK",
"en-DM",
"en-ER",
"en-FI",
"en-FJ",
"en-FK",
"en-FM",
"en-GB",
"en-GD",
"en-GG",
"en-GH",
"en-GI",
"en-GM",
"en-GU",
"en-GY",
"en-HK",
"en-IE",
"en-IL",
"en-IM",
"en-IN",
"en-IO",
"en-JE",
"en-JM",
"en-KE",
"en-KI",
"en-KN",
"en-KY",
"en-LC",
"en-LR",
"en-LS",
"en-MG",
"en-MH",
"en-MO",
"en-MP",
"en-MS",
"en-MT",
"en-MU",
"en-MW",
"en-MY",
"en-NA",
"en-NF",
"en-NG",
"en-NH",
"en-NL",
"en-NR",
"en-NU",
"en-NZ",
"en-PG",
"en-PH",
"en-PK",
"en-PN",
"en-PR",
"en-PW",
"en-RH",
"en-RW",
"en-SB",
"en-SC",
"en-SD",
"en-SE",
"en-SG",
"en-SH",
"en-SI",
"en-SL",
"en-SS",
"en-SX",
"en-SZ",
"en-TC",
"en-TK",
"en-TO",
"en-TT",
"en-TV",
"en",
"en-TZ",
"en-UG",
"en-UM",
"en-US-POSIX",
"en-US",
"en-VC",
"en-VG",
"en-VI",
"en-VU",
"en-WS",
"en-ZA",
"en-ZM",
"en-ZW",
"eo",
"es-419",
"es-AR",
"es-BO",
"es-BR",
"es-BZ",
"es-CL",
"es-CO",
"es-CR",
"es-CU",
"es-DO",
"es-EA",
"es-EC",
"es-ES",
"es-GQ",
"es-GT",
"es-HN",
"es-IC",
"es-MX",
"es-NI",
"es-PA",
"es-PE",
"es-PH",
"es-PR",
"es-PY",
"es-SV",
"es",
"es-US",
"es-UY",
"es-VE",
"et-EE",
"et",
"eu-ES",
"eu",
"ewo-CM",
"ewo",
"fa-AF",
"fa-IR",
"fa",
"ff",
"fi-FI",
"fil-PH",
"fil",
"fi",
"fo-DK",
"fo-FO",
"fo",
"fr-BE",
"fr-BF",
"fr-BI",
"fr-BJ",
"fr-BL",
"fr-CA",
"fr-CD",
"fr-CF",
"fr-CG",
"fr-CH",
"fr-CI",
"fr-CM",
"fr-DJ",
"fr-DZ",
"fr-FR",
"fr-GA",
"fr-GF",
"fr-GN",
"fr-GP",
"fr-GQ",
"fr-HT",
"fr-KM",
"fr-LU",
"fr-MA",
"fr-MC",
"fr-MF",
"fr-MG",
"fr-ML",
"fr-MQ",
"fr-MR",
"fr-MU",
"fr-NC",
"fr-NE",
"fr-PF",
"fr-PM",
"fr-RE",
"fr-RW",
"fr-SC",
"fr-SN",
"fr-SY",
"fr-TD",
"fr-TG",
"fr-TN",
"fr",
"fr-VU",
"fr-WF",
"fr-YT",
"fur-IT",
"fur",
"fy-NL",
"fy",
"ga-IE",
"ga",
"gd-GB",
"gd",
"gl-ES",
"gl",
"gsw-CH",
"gsw-FR",
"gsw-LI",
"gsw",
"gu-IN",
"gu",
"guz-KE",
"guz",
"gv-IM",
"gv",
"ha-GH",
"ha-NE",
"ha-NG",
"ha",
"haw",
"haw-US",
"he-IL",
"he",
"hi-IN",
"hi",
"hr-BA",
"hr-HR",
"hr",
"hsb-DE",
"hsb",
"hu-HU",
"hu",
"hy-AM",
"hy",
"ia-001",
"ia",
"id-ID",
"id",
"ig-NG",
"ig",
"ii-CN",
"ii",
"in-ID",
"in",
"is-IS",
"is",
"it-CH",
"it-IT",
"it-SM",
"it",
"it-VA",
"iw-IL",
"iw",
"ja-JP",
"ja",
"jgo-CM",
"jgo",
"jmc",
"jmc-TZ",
"jv-ID",
"jv",
"kab-DZ",
"kab",
"ka-GE",
"kam-KE",
"kam",
"ka",
"kde",
"kde-TZ",
"kea-CV",
"kea",
"khq-ML",
"khq",
"ki-KE",
"ki",
"kkj-CM",
"kkj",
"kk-KZ",
"kk",
"kl-GL",
"kln-KE",
"kln",
"kl",
"km-KH",
"km",
"kn-IN",
"kn",
"kok-IN",
"ko-KP",
"ko-KR",
"kok",
"ko",
"ksb",
"ksb-TZ",
"ksf-CM",
"ksf",
"ksh-DE",
"ksh",
"ks-IN",
"ks",
"ku-TR",
"ku",
"kw-GB",
"kw",
"ky-KG",
"ky",
"lag",
"lag-TZ",
"lb-LU",
"lb",
"lg",
"lg-UG",
"lkt",
"lkt-US",
"ln-AO",
"ln-CD",
"ln-CF",
"ln-CG",
"ln",
"lo-LA",
"lo",
"lrc-IQ",
"lrc-IR",
"lrc",
"lt-LT",
"lt",
"lu-CD",
"luo-KE",
"luo",
"lu",
"luy-KE",
"luy",
"lv-LV",
"lv",
"mas-KE",
"mas",
"mas-TZ",
"mer-KE",
"mer",
"mfe-MU",
"mfe",
"mgh-MZ",
"mgh",
"mg-MG",
"mgo-CM",
"mgo",
"mg",
"mi-NZ",
"mi",
"mk-MK",
"mk",
"ml-IN",
"ml",
"mn-MN",
"mn",
"mo",
"mr-IN",
"mr",
"ms-BN",
"ms-MY",
"ms-SG",
"ms",
"mt-MT",
"mt",
"mua-CM",
"mua",
"my-MM",
"my",
"mzn-IR",
"mzn",
"naq-NA",
"naq",
"nb-NO",
"nb-SJ",
"nb",
"nds-DE",
"nds-NL",
"nds",
"nd",
"nd-ZW",
"ne-IN",
"ne-NP",
"ne",
"nl-AW",
"nl-BE",
"nl-BQ",
"nl-CW",
"nl-NL",
"nl-SR",
"nl-SX",
"nl",
"nmg-CM",
"nmg",
"nnh-CM",
"nnh",
"nn-NO",
"nn",
"no-NY",
"no-NO",
"no",
"nus-SS",
"nus",
"nyn",
"nyn-UG",
"om-ET",
"om-KE",
"om",
"or-IN",
"or",
"os-GE",
"os-RU",
"os",
"pa-Arab-PK",
"pa-Arab",
"pa-Guru-IN",
"pa-Guru",
"pa-IN",
"pa-PK",
"pa",
"pl-PL",
"pl",
"ps-AF",
"ps",
"pt-AO",
"pt-BR",
"pt-CH",
"pt-CV",
"pt-GQ",
"pt-GW",
"pt-LU",
"pt-MO",
"pt-MZ",
"pt-PT",
"pt-ST",
"pt-TL",
"pt",
"qu-BO",
"qu-EC",
"qu-PE",
"qu",
"rm-CH",
"rm",
"rn-BI",
"rn",
"rof",
"rof-TZ",
"ro-MD",
"root",
"ro-RO",
"ro",
"ru-BY",
"ru-KG",
"ru-KZ",
"ru-MD",
"ru-RU",
"ru",
"ru-UA",
"rwk",
"rwk-TZ",
"rw-RW",
"rw",
"sah-RU",
"sah",
"saq-KE",
"saq",
"sbp",
"sbp-TZ",
"sd-PK",
"sd",
"se-FI",
"seh-MZ",
"seh",
"se-NO",
"se-SE",
"ses-ML",
"ses",
"se",
"sg-CF",
"sg",
"sh-BA",
"sh-CS",
"shi-Latn-MA",
"shi-Latn",
"shi-MA",
"shi-Tfng-MA",
"shi-Tfng",
"shi",
"sh",
"sh-YU",
"si-LK",
"si",
"sk-SK",
"sk",
"sl-SI",
"sl",
"smn-FI",
"smn",
"sn",
"sn-ZW",
"so-DJ",
"so-ET",
"so-KE",
"so-SO",
"so",
"sq-AL",
"sq-MK",
"sq",
"sq-XK",
"sr-BA",
"sr-CS",
"sr-Cyrl-BA",
"sr-Cyrl-CS",
"sr-Cyrl-ME",
"sr-Cyrl-RS",
"sr-Cyrl",
"sr-Cyrl-XK",
"sr-Cyrl-YU",
"sr-Latn-BA",
"sr-Latn-CS",
"sr-Latn-ME",
"sr-Latn-RS",
"sr-Latn",
"sr-Latn-XK",
"sr-Latn-YU",
"sr-ME",
"sr-RS",
"sr",
"sr-XK",
"sr-YU",
"sv-AX",
"sv-FI",
"sv-SE",
"sv",
"sw-CD",
"sw-KE",
"sw",
"sw-TZ",
"sw-UG",
"ta-IN",
"ta-LK",
"ta-MY",
"ta-SG",
"ta",
"te-IN",
"teo-KE",
"teo",
"teo-UG",
"te",
"tg-TJ",
"tg",
"th-TH",
"th",
"ti-ER",
"ti-ET",
"ti",
"tk-TM",
"tk",
"tl-PH",
"tl",
"to-TO",
"to",
"tr-CY",
"tr-TR",
"tr",
"tt-RU",
"tt",
"twq-NE",
"twq",
"tzm-MA",
"tzm",
"ug-CN",
"ug",
"uk",
"uk-UA",
"ur-IN",
"ur-PK",
"ur",
"uz-AF",
"uz-Arab-AF",
"uz-Arab",
"uz-Cyrl",
"uz-Cyrl-UZ",
"uz-Latn",
"uz-Latn-UZ",
"uz",
"uz-UZ",
"vai-Latn-LR",
"vai-Latn",
"vai-LR",
"vai",
"vai-Vaii-LR",
"vai-Vaii",
"vi",
"vi-VN",
"vun",
"vun-TZ",
"wae-CH",
"wae",
"wa",
"wo-SN",
"wo",
"xh",
"xh-ZA",
"xog",
"xog-UG",
"yav-CM",
"yav",
"yi-001",
"yi",
"yo-BJ",
"yo-NG",
"yo",
"yue-CN",
"yue-Hans-CN",
"yue-Hans",
"yue-Hant-HK",
"yue-Hant",
"yue-HK",
"yue",
"zgh-MA",
"zgh",
"zh-CN",
"zh-Hans-CN",
"zh-Hans-HK",
"zh-Hans-MO",
"zh-Hans-SG",
"zh-Hans",
"zh-Hant-HK",
"zh-Hant-MO",
"zh-Hant-TW",
"zh-Hant",
"zh-HK",
"zh-MO",
"zh-SG",
"zh-TW",
"zh",
"zu",
"zu-ZA"
];
var intlObjectNames = [
"DateTimeFormat",
"NumberFormat",
"Collator",
"v8BreakIterator",
"PluralRules",
"Locale",
"ListFormat",
"Segmenter",
"RelativeTimeFormat"
];
for (let loc of locales) {
for (let constructor of intlObjectNames) {
let msg = `new Intl.${constructor}(${loc})`;
print(msg);
let obj = new Intl[constructor](loc);
assertNotNull(obj, msg + ' should not be null');
}
}

View File

@ -0,0 +1,87 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// The following tz are NOT impacted by v8:8469
var some_tz_list = [
"ciabj",
"ghacc",
];
// The following tz ARE impacted by v8:8469
var problem_tz_list = [
"etadd",
"tzdar",
"eheai",
"sttms",
"arirj",
"arrgl",
"aruaq",
"arluq",
"mxpvr",
"brbvb",
"arbue",
"caycb",
"brcgr",
"cayzs",
"crsjo",
"caydq",
"svsal",
"cafne",
"caglb",
"cagoo",
"tcgdt",
"ustel",
"bolpb",
"uslax",
"sxphi",
"mxmex",
"usnyc",
"usxul",
"usndcnt",
"usndnsl",
"ttpos",
"brpvh",
"prsju",
"clpuq",
"caffs",
"cayek",
"brrbr",
"mxstis",
"dosdq",
"brsao",
"gpsbh",
"casjf",
"knbas",
"lccas",
"vistt",
"vcsvd",
"cayyn",
"cathu",
"hkhkg",
"mykul",
"khpnh",
"cvrai",
"gsgrv",
"shshn",
"aubhq",
"auldh",
"imdgs",
"smsai",
"asppg",
"pgpom",
];
let expectedTimeZone = (new Intl.DateTimeFormat("en"))
.resolvedOptions().timeZone;
function testTz(tz) {
print(tz);
let timeZone = (new Intl.DateTimeFormat("en-u-tz-" + tz))
.resolvedOptions().timeZone;
assertEquals(expectedTimeZone, timeZone);
}
// first test soem tz not impacted by v8:8469 to ensure testTz is correct.
for (var tz of some_tz_list) testTz(tz);
for (var tz of problem_tz_list) testTz(tz);

View File

@ -0,0 +1,27 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// test the numberingSystem is set correctly via -u-nu-
let dtf = new Intl.DateTimeFormat(["en-u-ba-rfoo-nu-arab-fo-obar"]);
assertEquals("arab", dtf.resolvedOptions().numberingSystem);
assertEquals("en-u-nu-arab", dtf.resolvedOptions().locale);
let nf = new Intl.NumberFormat(["en-u-ba-rfoo-nu-arab-fo-obar"]);
assertEquals("arab", nf.resolvedOptions().numberingSystem);
assertEquals("١٢٣", nf.format(123));
assertEquals("en-u-nu-arab", nf.resolvedOptions().locale);
dtf = new Intl.DateTimeFormat(["en-u-ba-rfoo-nu-thai-fo-obar"]);
assertEquals("thai", dtf.resolvedOptions().numberingSystem);
assertEquals("en-u-nu-thai", dtf.resolvedOptions().locale);
nf = new Intl.NumberFormat(["en-u-ba-rfoo-nu-thai-fo-obar"]);
assertEquals("thai", nf.resolvedOptions().numberingSystem);
assertEquals("๑๒๓", nf.format(123));
assertEquals("en-u-nu-thai", nf.resolvedOptions().locale);
nf = new Intl.NumberFormat(["ar-EG-u-nu-latn"]);
assertEquals("latn", nf.resolvedOptions().numberingSystem);
assertEquals("123", nf.format(123));
assertEquals("ar-EG-u-nu-latn", nf.resolvedOptions().locale);

View File

@ -213,7 +213,7 @@ TestCoverage(
nop(); // 0100
} // 0150
}(); // 0200
%RunMicrotasks(); // 0250
%PerformMicrotaskCheckpoint(); // 0250
`,
[{"start":0,"end":299,"count":1},
{"start":1,"end":201,"count":6}, // TODO(jgruber): Invocation count is off.
@ -662,7 +662,7 @@ async function f() { // 0000
await 42; // 0100
}; // 0150
f(); // 0200
%RunMicrotasks(); // 0250
%PerformMicrotaskCheckpoint(); // 0250
`,
[{"start":0,"end":299,"count":1},
{"start":0,"end":151,"count":3},

View File

@ -0,0 +1,20 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
function f(b, s, x) {
if (!b) {
return (x ? b : s * undefined) ? 1 : 42;
}
}
function g(b, x) {
return f(b, 'abc', x);
}
f(false, 0, 0);
g(true, 0);
%OptimizeFunctionOnNextCall(g);
assertEquals(42, g(false, 0));

View File

@ -40,7 +40,7 @@ function assertArrayValues(expected, actual) {
}
function assertOrdering(expected) {
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertArrayValues(expected, ordering);
}

View File

@ -21,7 +21,7 @@ function assertEqualsAsync(expected, run, msg) {
assertFalse(hadValue || hadError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (hadError) throw actual;

View File

@ -21,7 +21,7 @@ function assertEqualsAsync(expected, run, msg) {
assertFalse(hadValue || hadError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (hadError) throw actual;

View File

@ -21,7 +21,7 @@ function assertEqualsAsync(expected, run, msg) {
assertFalse(hadValue || hadError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (hadError) throw actual;

View File

@ -21,7 +21,7 @@ function assertEqualsAsync(expected, run, msg) {
assertFalse(hadValue || hadError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (hadError) throw actual;

View File

@ -23,7 +23,7 @@ function assertThrowsAsync(run, errorType, message) {
assertFalse(hadValue || hadError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (!hadError) {
throw new MjsUnitAssertionError(
@ -57,7 +57,7 @@ function assertEqualsAsync(expected, run, msg) {
assertFalse(hadValue || hadError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (hadError) throw actual;
@ -402,7 +402,7 @@ assertDoesNotThrow(gaga);
}
}
foo().then(() => log.push("c"));
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(["b", "a", "c"], log);
}
@ -416,7 +416,7 @@ assertDoesNotThrow(gaga);
}
}
foo().then(() => log.push("c"));
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(["b", "a", "c"], log);
}
@ -430,7 +430,7 @@ assertDoesNotThrow(gaga);
}
}
foo().then(() => log.push("c"));
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(["a", "b", "c"], log);
}
@ -445,7 +445,7 @@ assertDoesNotThrow(gaga);
}
}
foo().then(() => log.push("c"));
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(["b", "c", "a"], log);
}
@ -459,7 +459,7 @@ assertDoesNotThrow(gaga);
}
}
foo().then(() => log.push("c"));
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(["b", "a", "c"], log);
}
@ -473,7 +473,7 @@ assertDoesNotThrow(gaga);
}
}
foo().then(() => log.push("c"));
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(["a", "b", "c"], log);
}
@ -488,7 +488,7 @@ assertDoesNotThrow(gaga);
}
}
foo().then(() => log.push("c"));
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(["b", "a", "c"], log);
}
@ -502,7 +502,7 @@ assertDoesNotThrow(gaga);
}
}
foo().then(() => log.push("c"));
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(["b", "a", "c"], log);
}
@ -516,7 +516,7 @@ assertDoesNotThrow(gaga);
}
}
foo().then(() => log.push("c"));
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(["a", "b", "c"], log);
}
@ -531,7 +531,7 @@ assertDoesNotThrow(gaga);
}
}
foo().then(() => log.push("c"));
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(["b", "c", "a"], log);
}
@ -545,7 +545,7 @@ assertDoesNotThrow(gaga);
}
}
foo().then(() => log.push("c"));
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(["b", "c", "a"], log);
}
@ -559,7 +559,7 @@ assertDoesNotThrow(gaga);
}
}
foo().then(() => log.push("c"));
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(["a", "b", "c"], log);
}
@ -585,7 +585,7 @@ assertDoesNotThrow(gaga);
var ans;
f2().then(x => ans = x).catch(e => ans = e);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([0], ans);
}

View File

@ -23,5 +23,5 @@ async function bar() {
foo();
bar();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(2, count);

View File

@ -21,7 +21,7 @@ function assertEqualsAsync(expected, run, msg) {
assertFalse(hadValue || hadError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (hadError) throw actual;

View File

@ -21,7 +21,7 @@ function assertThrowsAsync(run, errorType, message) {
assertFalse(hadValue || hadError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (!hadError) {
throw new MjsUnitAssertionError(
@ -55,7 +55,7 @@ function assertEqualsAsync(expected, run, msg) {
assertFalse(hadValue || hadError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (hadError) throw actual;
@ -77,7 +77,7 @@ function assertEqualsAsync(expected, run, msg) {
assertEquals(1, y);
assertEquals(1, z);
assertEquals(0, w);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(1, y);
assertEquals(1, z);
assertEquals(1, w);

View File

@ -21,7 +21,7 @@ function assertThrowsAsync(run, errorType, message) {
assertFalse(hadValue || hadError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (!hadError) {
throw new MjsUnitAssertionError(
@ -55,7 +55,7 @@ function assertEqualsAsync(expected, run, msg) {
assertFalse(hadValue || hadError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (hadError) throw actual;

View File

@ -24,7 +24,7 @@ function assertThrowsAsync(run, errorType, message) {
assertFalse(hadValue || hadError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (!hadError) {
throw new MjsUnitAssertionError(
@ -185,7 +185,7 @@ class MyError extends Error {};
testFailure = error;
});
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (testFailed) {
throw testFailure;
}
@ -619,7 +619,7 @@ if (testFailed) {
testFailure = error;
});
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (testFailed) {
throw testFailure;
}
@ -663,7 +663,7 @@ if (testFailed) {
// Cycle through `f` to extract iterator methods
f().catch(function() { %AbortJS("No error should have occurred"); });
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(typeof extractedNext, "function");
assertThrowsAsync(() => extractedNext.call(undefined), TypeError);

View File

@ -21,7 +21,7 @@ function assertThrowsAsync(run, errorType, message) {
assertFalse(hadValue || hadError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (!hadError) {
throw new MjsUnitAssertionError(
@ -55,7 +55,7 @@ function assertEqualsAsync(expected, run, msg) {
assertFalse(hadValue || hadError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (hadError) throw actual;
@ -448,7 +448,7 @@ async function* asyncGeneratorForNestedResumeNext() {
}
it = asyncGeneratorForNestedResumeNext();
it.next().then(logIterResult, AbortUnreachable);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
{ value: "rootbeer", done: false },
{ value: "float", done: false },
@ -464,7 +464,7 @@ let asyncGeneratorExprForNestedResumeNext = async function*() {
};
it = asyncGeneratorExprForNestedResumeNext();
it.next().then(logIterResult, AbortUnreachable);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
{ value: "first", done: false },
{ value: "second", done: false },
@ -482,7 +482,7 @@ let asyncGeneratorMethodForNestedResumeNext = ({
}).method;
it = asyncGeneratorMethodForNestedResumeNext();
it.next().then(logIterResult, AbortUnreachable);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
{ value: "remember", done: false },
{ value: "the cant!", done: false },
@ -498,7 +498,7 @@ let asyncGeneratorCallEvalForNestedResumeNext =
yield await Resolver("rainbow!");`);
it = asyncGeneratorCallEvalForNestedResumeNext();
it.next().then(logIterResult, AbortUnreachable);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
{ value: "reading", done: false },
{ value: "rainbow!", done: false },
@ -514,7 +514,7 @@ let asyncGeneratorNewEvalForNestedResumeNext =
yield await Resolver("BB!");`);
it = asyncGeneratorNewEvalForNestedResumeNext();
it.next().then(logIterResult, AbortUnreachable);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
{ value: 731, done: false },
{ value: "BB!", done: false },
@ -536,7 +536,7 @@ async function* asyncGeneratorForNestedResumeThrow() {
}
it = asyncGeneratorForNestedResumeThrow();
it.next().then(logIterResult, logError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
"throw1",
"throw2",
@ -556,7 +556,7 @@ let asyncGeneratorExprForNestedResumeThrow = async function*() {
};
it = asyncGeneratorExprForNestedResumeThrow();
it.next().then(logIterResult, logError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
"throw3",
"throw4",
@ -578,7 +578,7 @@ let asyncGeneratorMethodForNestedResumeThrow = ({
}).method;
it = asyncGeneratorMethodForNestedResumeThrow();
it.next().then(logIterResult, logError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
"throw5",
"throw6",
@ -598,7 +598,7 @@ let asyncGeneratorCallEvalForNestedResumeThrow =
AbortUnreachable();`);
it = asyncGeneratorCallEvalForNestedResumeThrow();
it.next().then(logIterResult, logError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
"throw7",
"throw8",
@ -618,7 +618,7 @@ let asyncGeneratorNewEvalForNestedResumeThrow =
AbortUnreachable();`);
it = asyncGeneratorNewEvalForNestedResumeThrow();
it.next().then(logIterResult, logError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
"throw9",
"throw10",
@ -636,7 +636,7 @@ async function* asyncGeneratorForNestedResumeReturn() {
}
it = asyncGeneratorForNestedResumeReturn();
it.next().then(logIterResult, logError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
{ value: "step1", done: false },
{ value: "step2", done: true },
@ -651,7 +651,7 @@ let asyncGeneratorExprForNestedResumeReturn = async function*() {
};
it = asyncGeneratorExprForNestedResumeReturn();
it.next().then(logIterResult, logError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
{ value: "step3", done: false },
{ value: "step4", done: true },
@ -668,7 +668,7 @@ let asyncGeneratorMethodForNestedResumeReturn = ({
}).method;
it = asyncGeneratorMethodForNestedResumeReturn();
it.next().then(logIterResult, logError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
{ value: "step5", done: false },
{ value: "step6", done: true },
@ -683,7 +683,7 @@ let asyncGeneratorCallEvalForNestedResumeReturn =
yield "step7";`);
it = asyncGeneratorCallEvalForNestedResumeReturn();
it.next().then(logIterResult, logError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
{ value: "step7", done: false },
{ value: "step8", done: true },
@ -698,7 +698,7 @@ let asyncGeneratorNewEvalForNestedResumeReturn =
yield "step9";`);
it = asyncGeneratorNewEvalForNestedResumeReturn();
it.next().then(logIterResult, logError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals([
{ value: "step9", done: false },
{ value: "step10", done: true },

View File

@ -1257,7 +1257,7 @@ let testFailure;
testFailure = error;
});
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (testFailed) {
throw testFailure;

View File

@ -7,7 +7,7 @@
var error1, error2;
import('modules-skip-12.js').catch(e => error1 = e);
import('modules-skip-12.js').catch(e => error2 = e);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(error1, error2);
assertInstanceof(error1, SyntaxError);

View File

@ -7,7 +7,7 @@
var error1, error2;
import('modules-skip-11.js').catch(e => error1 = e);
import('modules-skip-11.js').catch(e => error2 = e);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(error1, error2);
assertEquals(typeof error1, "symbol");

View File

@ -7,7 +7,7 @@
var error1, error2;
import('no-such-file').catch(e => error1 = e);
import('no-such-file').catch(e => error2 = e);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(error1, error2);
assertEquals(typeof error1, "string");

View File

@ -7,7 +7,7 @@
var error1, error2;
import('modules-skip-10.js').catch(e => error1 = e);
import('modules-skip-10.js').catch(e => error2 = e);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(error1, error2);
assertInstanceof(error1, SyntaxError);

View File

@ -7,6 +7,6 @@
var life;
import('modules-skip-1.js').then(namespace => life = namespace.life());
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(42, life);

View File

@ -9,7 +9,7 @@ import('modules-skip-6.js').then(namespace => life = namespace.life);
assertEquals(undefined, Object.life);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(42, Object.life);
assertEquals("42", life);

View File

@ -18,5 +18,5 @@ async function test() {
}
test();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);

View File

@ -15,5 +15,5 @@ async function test() {
}
test();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);

View File

@ -19,7 +19,7 @@ async function test1() {
}
test1();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);
ran = false;
@ -36,5 +36,5 @@ async function test2() {
}
test2();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);

View File

@ -22,5 +22,5 @@ async function test() {
}
test();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);

View File

@ -17,7 +17,7 @@ async function test1() {
}
test1();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);
ran = false;
@ -37,7 +37,7 @@ async function test2() {
}
test2();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);
ran = false;
@ -53,5 +53,5 @@ async function test3() {
}
test3();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);

View File

@ -12,7 +12,7 @@ var body = "import('modules-skip-1.js').then(ns => { x = ns.life();" +
var func = new Function(body);
func();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(42, x);
assertTrue(ran);
@ -21,7 +21,7 @@ var body = "import('modules-skip-1.js').then(ns => { x = ns.life();" +
" ran = true;} ).catch(err => %AbortJS(err))"
eval("var func = new Function(body); func();");
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(42, x);
assertTrue(ran);
@ -31,6 +31,6 @@ var body = "eval(import('modules-skip-1.js').then(ns => { x = ns.life();" +
var func = new Function(body);
func();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(42, x);
assertTrue(ran);

View File

@ -6,6 +6,6 @@
var ns;
import('modules-skip-13.js').then(x => ns = x);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(42, ns.default);
assertEquals(ns, ns.self);

View File

@ -12,7 +12,7 @@ import('modules-skip-2.js').catch(err => msg = err.message);
assertEquals(undefined, life);
assertEquals(undefined, msg);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(42, life);
assertEquals('42 is not the answer', msg);

View File

@ -17,6 +17,6 @@ async function foo () {
foo();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);

View File

@ -9,5 +9,5 @@ let x = 'modules-skip-1.js';
import(x).then(namespace => life = namespace.life());
x = 'modules-skip-2.js';
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(42, life);

View File

@ -25,5 +25,5 @@ async function test() {
test();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);

View File

@ -19,6 +19,6 @@ async function test() {
test();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);

View File

@ -43,7 +43,7 @@ async function test1() {
test1();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);
@ -66,7 +66,7 @@ async function test2() {
test2();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);
@ -86,6 +86,6 @@ async function test3() {
test3();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);

View File

@ -18,5 +18,5 @@ async function test() {
}
test();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(ran);

View File

@ -25,7 +25,7 @@ let weak_ref;
})();
// Clear the KeepDuringJob set.
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
weak_ref.deref();
o = null;
@ -37,7 +37,7 @@ gc();
wf.cleanupSome();
assertEquals(0, cleanup_count);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// Next turn.
// This GC detects the WeakRef as dirty.

View File

@ -25,7 +25,7 @@ let weak_ref;
})();
// Clear the KeepDuringJob set.
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
weak_ref.deref();
o = null;
@ -37,7 +37,7 @@ gc();
wf.cleanupSome();
assertEquals(0, cleanup_count);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// Next turn.
// Now the WeakRef can be cleared.
@ -51,7 +51,7 @@ assertEquals(weak_ref, cleanup_cells[0]);
// The cleanup task is not executed again since all WeakCells have been
// processed.
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// Next turn.
assertEquals(1, cleanup_count);

View File

@ -31,7 +31,7 @@ gc();
wf.cleanupSome();
assertEquals(0, cleanup_count);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// Next turn.
// Now the WeakRef can be cleared.

View File

@ -28,7 +28,7 @@ let wr;
gc();
assertNotEquals(undefined, wr.deref());
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// New turn.
let o = wr.deref();

View File

@ -38,7 +38,7 @@ gc();
assertNotEquals(undefined, wr2.deref());
})();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// New turn.
assertEquals(0, cleanup_count);
@ -47,7 +47,7 @@ wr1.deref();
o1 = null;
gc(); // deref makes sure we don't clean up wr1
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// New turn.
assertEquals(0, cleanup_count);
@ -56,7 +56,7 @@ wr2.deref();
o2 = null;
gc(); // deref makes sure we don't clean up wr2
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// New turn.
assertEquals(1, cleanup_count);
@ -64,7 +64,7 @@ assertEquals(wr1, cleared_cells1[0]);
gc();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// New turn.
assertEquals(2, cleanup_count);

View File

@ -34,12 +34,12 @@ gc();
assertNotEquals(undefined, weak_ref.deref());
})();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// Next turn.
gc();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// Next turn.
assertTrue(cleanup_called);

View File

@ -33,14 +33,14 @@ gc();
assertNotEquals(undefined, wr.deref());
})();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// Next turn.
assertFalse(cleanup_called);
gc();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// Next turn.
assertTrue(cleanup_called);

View File

@ -29,12 +29,12 @@ let strong = {a: wr.deref(), b: wr_control.deref()};
gc();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// Next turn.
gc();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// Next turn.
// We have a strong reference to the objects, so the WeakRefs are not cleared yet.
@ -57,7 +57,7 @@ gc();
assertEquals(undefined, wr_control.deref());
})();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// Next turn.
assertEquals(1, cleanup_count);
@ -66,7 +66,7 @@ assertEquals(wc, cleanup_cells[0]);
gc();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
// Next turn.
assertEquals(2, cleanup_count);

View File

@ -32,6 +32,7 @@
'modules-skip*': [SKIP],
'harmony/modules-skip*': [SKIP],
'regress/modules-skip*': [SKIP],
'wasm/exceptions-utils': [SKIP],
'wasm/wasm-constants': [SKIP],
'wasm/wasm-module-builder': [SKIP],
@ -569,6 +570,10 @@
'regress/regress-752764': [SKIP],
'regress/regress-779407': [SKIP],
'harmony/bigint/regressions': [SKIP],
# Pre-r6 MIPS32 doesn't have instructions needed to properly handle 64-bit
# atomic instructions.
'wasm/atomics64-stress': [PASS, ['mips_arch_variant != r6', SKIP]],
}], # 'arch == mipsel or arch == mips'
##############################################################################
@ -623,6 +628,11 @@
'regress/regress-779407': [SKIP],
}], # 'arch == mips64el or arch == mips64'
['(arch == mips64el or arch == mips64) and simulator_run', {
# Slow tests which have flaky timeout on simulator.
'wasm/atomics64-stress': [SKIP],
}], # '(arch == mips64el or arch == mips64) and simulator_run'
##############################################################################
['system == windows', {
# TODO(mstarzinger): Too slow with turbo fan.

View File

@ -11,7 +11,7 @@ let log = [];
return 10;
}
})();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
(function() {
with ({get ['.new.target']() { log.push('new.target') }}) {

View File

@ -18,6 +18,6 @@ Promise.resolve(Promise.resolve()).then(() => log += "|fast-resolve");
(class extends Promise {}).resolve(Promise.resolve()).then(() => log += "|slow-resolve");
log += "|start";
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals("|start|turn1|fast-resolve|turn2|turn3|slow-resolve|turn4\n\
|start|turn1|fast-resolve|turn2|turn3|slow-resolve|turn4", result);

View File

@ -9,5 +9,5 @@ function f() {
success = (f.caller === null);
}
Promise.resolve().then(f);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(success);

View File

@ -17,6 +17,6 @@ var error;
var promise = __f_0();
promise.then(assertUnreachable,
err => { done = true; error = err });
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertTrue(error.startsWith('Error reading'));
assertTrue(done);

View File

@ -17,7 +17,7 @@ function TryToLoadModule(filename, expect_error, token) {
}
import(filename).catch(SetError);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
if (expect_error) {
assertTrue(caught_error instanceof SyntaxError);

View File

@ -27,5 +27,5 @@ function g() {
let namespace = Promise.resolve().then(importUndefined);
}
g();
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assertEquals(list, [1,2]);

View File

@ -0,0 +1,5 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
assertEquals(7, ({[Symbol.hasInstance.description]:7})["Symbol.hasInstance"]);

View File

@ -0,0 +1,85 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --wasm-shared-engine --no-wasm-disable-structured-cloning --allow-natives-syntax --experimental-wasm-threads
load('test/mjsunit/wasm/wasm-constants.js');
load('test/mjsunit/wasm/wasm-module-builder.js');
// In this test we start a worker which enters wasm and stays there in a loop.
// The main thread stays in JS and checks that its thread-in-wasm flag is not
// set. The main thread calls setTimeout after every check to give the worker a
// chance to be scheculed.
const sync_address = 12;
(function TestPostModule() {
let builder = new WasmModuleBuilder();
let sig_index = builder.addType(kSig_v_v);
let import_id = builder.addImport('m', 'func', sig_index);
builder.addFunction('wait', kSig_v_v)
.addBody([
// Calling the imported function sets the thread-in-wasm flag of the
// main thread.
kExprCallFunction, import_id, // --
kExprLoop, kWasmStmt, // --
kExprI32Const, sync_address, // --
kExprI32LoadMem, 0, 0, // --
kExprI32Eqz,
kExprBrIf, 0, // --
kExprEnd,
])
.exportFunc();
builder.addFunction('signal', kSig_v_v)
.addBody([
kExprI32Const, sync_address, // --
kExprI32Const, 1, // --
kExprI32StoreMem, 0, 0, // --
])
.exportFunc();
builder.addImportedMemory("m", "imported_mem", 0, 1, "shared");
let module = builder.toModule();
let memory = new WebAssembly.Memory({initial: 1, maximum: 1, shared: true});
let workerScript = `
onmessage = function(msg) {
try {
let worker_instance = new WebAssembly.Instance(msg.module,
{m: {imported_mem: msg.memory,
func: _ => 5}});
postMessage("start running");
worker_instance.exports.wait();
postMessage("finished");
} catch(e) {
postMessage('ERROR: ' + e);
}
}
`;
let worker = new Worker(workerScript, {type: 'string'});
worker.postMessage({module: module, memory: memory});
let main_instance = new WebAssembly.Instance(
module, {m: {imported_mem: memory, func: _ => 7}});
let counter = 0;
function CheckThreadNotInWasm() {
// We check the thread-in-wasm flag many times and reschedule ourselves in
// between to increase the chance that we read the flag set by the worker.
assertFalse(%IsThreadInWasm());
counter++;
if (counter < 100) {
setTimeout(CheckThreadNotInWasm, 0);
} else {
main_instance.exports.signal(sync_address);
assertEquals('finished', worker.getMessage());
worker.terminate();
}
}
assertFalse(%IsThreadInWasm());
assertEquals('start running', worker.getMessage());
CheckThreadNotInWasm();
})();

View File

@ -80,7 +80,7 @@ var testAsync;
}
drainMicrotasks() {
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
}
done_() {
@ -111,7 +111,7 @@ var testAsync;
testAsync = function(test, name) {
let assert = new AsyncAssertion(test, name);
test(assert);
%RunMicrotasks();
%PerformMicrotaskCheckpoint();
assert.done_();
}
})();

View File

@ -562,9 +562,6 @@
'built-ins/Object/internals/DefineOwnProperty/consistent-value-function-caller': [FAIL_SLOPPY],
'built-ins/Object/internals/DefineOwnProperty/consistent-value-function-arguments': [FAIL_SLOPPY],
# https://bugs.chromium.org/p/v8/issues/detail?id=7874
'built-ins/Reflect/ownKeys/return-on-corresponding-order-large-index': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=6776
'built-ins/Proxy/ownKeys/return-duplicate-entries-throws': [FAIL],
'built-ins/Proxy/ownKeys/return-duplicate-symbol-entries-throws': [FAIL],
@ -666,6 +663,16 @@
'language/expressions/await/for-await-of-interleaved': ['--harmony-await-optimization'],
'language/expressions/await/async-await-interleaved': ['--harmony-await-optimization'],
# https://bugs.chromium.org/p/v8/issues/detail?id=6891
'intl402/Segmenter/iterator/following': [FAIL],
'intl402/Segmenter/iterator/granularity': [FAIL],
'intl402/Segmenter/iterator/preceding': [FAIL],
'intl402/Segmenter/prototype/segment/segment-line': [FAIL],
'intl402/Segmenter/prototype/segment/segment-sentence': [FAIL],
'intl402/Segmenter/prototype/segment/segment-word': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=8021
'built-ins/Object/fromEntries/requires-argument': [FAIL],
######################## NEEDS INVESTIGATION ###########################
# These test failures are specific to the intl402 suite and need investigation

View File

@ -63,7 +63,8 @@ FEATURE_FLAGS = {
SKIPPED_FEATURES = set(['class-fields-private',
'class-static-fields-private',
'class-methods-private',
'class-static-methods-private'])
'class-static-methods-private',
'Intl.NumberFormat-unified'])
DATA = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")

View File

@ -5,7 +5,6 @@
[
[ALWAYS, {
# https://bugs.chromium.org/p/v8/issues/detail?id=8319
'interface': [FAIL],
'memory/grow': [FAIL],
'memory/constructor': [FAIL],
'table/grow': [FAIL],