Commit 49898aad authored by Adam Klein's avatar Adam Klein Committed by Commit Bot

Remove always-true --harmony-async-iteration runtime flag

It was shipped in Chrome 63.

Bug: v8:5855
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Icc00b8300622d1c7b5662be8ac5e425b9781f666
Reviewed-on: https://chromium-review.googlesource.com/858381
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50558}
parent 2838109f
...@@ -2174,6 +2174,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object, ...@@ -2174,6 +2174,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
false); false);
// Install well-known symbols. // Install well-known symbols.
InstallConstant(isolate, symbol_fun, "asyncIterator",
factory->async_iterator_symbol());
InstallConstant(isolate, symbol_fun, "hasInstance", InstallConstant(isolate, symbol_fun, "hasInstance",
factory->has_instance_symbol()); factory->has_instance_symbol());
InstallConstant(isolate, symbol_fun, "isConcatSpreadable", InstallConstant(isolate, symbol_fun, "isConcatSpreadable",
...@@ -4408,13 +4410,6 @@ void Genesis::InitializeGlobal_harmony_array_prototype_values() { ...@@ -4408,13 +4410,6 @@ void Genesis::InitializeGlobal_harmony_array_prototype_values() {
NONE); NONE);
} }
void Genesis::InitializeGlobal_harmony_async_iteration() {
if (!FLAG_harmony_async_iteration) return;
Handle<JSFunction> symbol_fun(native_context()->symbol_function());
InstallConstant(isolate(), symbol_fun, "asyncIterator",
factory()->async_iterator_symbol());
}
void Genesis::InitializeGlobal_harmony_promise_finally() { void Genesis::InitializeGlobal_harmony_promise_finally() {
if (!FLAG_harmony_promise_finally) return; if (!FLAG_harmony_promise_finally) return;
......
...@@ -223,7 +223,6 @@ DEFINE_IMPLICATION(harmony_class_fields, harmony_static_fields) ...@@ -223,7 +223,6 @@ DEFINE_IMPLICATION(harmony_class_fields, harmony_static_fields)
V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \ V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \
V(harmony_regexp_named_captures, "harmony regexp named captures") \ V(harmony_regexp_named_captures, "harmony regexp named captures") \
V(harmony_regexp_property, "harmony Unicode regexp property classes") \ V(harmony_regexp_property, "harmony Unicode regexp property classes") \
V(harmony_async_iteration, "harmony async iteration") \
V(harmony_function_tostring, "harmony Function.prototype.toString") \ V(harmony_function_tostring, "harmony Function.prototype.toString") \
V(harmony_promise_finally, "harmony Promise.prototype.finally") V(harmony_promise_finally, "harmony Promise.prototype.finally")
......
...@@ -282,7 +282,6 @@ class ParserBase { ...@@ -282,7 +282,6 @@ class ParserBase {
allow_harmony_static_fields_(false), allow_harmony_static_fields_(false),
allow_harmony_dynamic_import_(false), allow_harmony_dynamic_import_(false),
allow_harmony_import_meta_(false), allow_harmony_import_meta_(false),
allow_harmony_async_iteration_(false),
allow_harmony_optional_catch_binding_(false) {} allow_harmony_optional_catch_binding_(false) {}
#define ALLOW_ACCESSORS(name) \ #define ALLOW_ACCESSORS(name) \
...@@ -296,7 +295,6 @@ class ParserBase { ...@@ -296,7 +295,6 @@ class ParserBase {
ALLOW_ACCESSORS(harmony_static_fields); ALLOW_ACCESSORS(harmony_static_fields);
ALLOW_ACCESSORS(harmony_dynamic_import); ALLOW_ACCESSORS(harmony_dynamic_import);
ALLOW_ACCESSORS(harmony_import_meta); ALLOW_ACCESSORS(harmony_import_meta);
ALLOW_ACCESSORS(harmony_async_iteration);
ALLOW_ACCESSORS(harmony_optional_catch_binding); ALLOW_ACCESSORS(harmony_optional_catch_binding);
#undef ALLOW_ACCESSORS #undef ALLOW_ACCESSORS
...@@ -1536,7 +1534,6 @@ class ParserBase { ...@@ -1536,7 +1534,6 @@ class ParserBase {
bool allow_harmony_static_fields_; bool allow_harmony_static_fields_;
bool allow_harmony_dynamic_import_; bool allow_harmony_dynamic_import_;
bool allow_harmony_import_meta_; bool allow_harmony_import_meta_;
bool allow_harmony_async_iteration_;
bool allow_harmony_optional_catch_binding_; bool allow_harmony_optional_catch_binding_;
friend class DiscardableZoneScope; friend class DiscardableZoneScope;
...@@ -2131,8 +2128,7 @@ typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParsePropertyName( ...@@ -2131,8 +2128,7 @@ typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParsePropertyName(
!scanner()->HasAnyLineTerminatorAfterNext()) { !scanner()->HasAnyLineTerminatorAfterNext()) {
Consume(Token::ASYNC); Consume(Token::ASYNC);
token = peek(); token = peek();
if (token == Token::MUL && allow_harmony_async_iteration() && if (token == Token::MUL && !scanner()->HasAnyLineTerminatorBeforeNext()) {
!scanner()->HasAnyLineTerminatorBeforeNext()) {
Consume(Token::MUL); Consume(Token::MUL);
token = peek(); token = peek();
*is_generator = true; *is_generator = true;
...@@ -3993,7 +3989,7 @@ ParserBase<Impl>::ParseHoistableDeclaration( ...@@ -3993,7 +3989,7 @@ ParserBase<Impl>::ParseHoistableDeclaration(
const bool is_async = flags & ParseFunctionFlags::kIsAsync; const bool is_async = flags & ParseFunctionFlags::kIsAsync;
DCHECK(!is_generator || !is_async); DCHECK(!is_generator || !is_async);
if (allow_harmony_async_iteration() && is_async && Check(Token::MUL)) { if (is_async && Check(Token::MUL)) {
// Async generator // Async generator
is_generator = true; is_generator = true;
} }
...@@ -4568,7 +4564,7 @@ ParserBase<Impl>::ParseAsyncFunctionLiteral(bool* ok) { ...@@ -4568,7 +4564,7 @@ ParserBase<Impl>::ParseAsyncFunctionLiteral(bool* ok) {
IdentifierT name = impl()->NullIdentifier(); IdentifierT name = impl()->NullIdentifier();
FunctionLiteral::FunctionType type = FunctionLiteral::kAnonymousExpression; FunctionLiteral::FunctionType type = FunctionLiteral::kAnonymousExpression;
bool is_generator = allow_harmony_async_iteration() && Check(Token::MUL); bool is_generator = Check(Token::MUL);
const bool kIsAsync = true; const bool kIsAsync = true;
const FunctionKind kind = FunctionKindFor(is_generator, kIsAsync); const FunctionKind kind = FunctionKindFor(is_generator, kIsAsync);
...@@ -4957,8 +4953,7 @@ typename ParserBase<Impl>::StatementT ParserBase<Impl>::ParseStatement( ...@@ -4957,8 +4953,7 @@ typename ParserBase<Impl>::StatementT ParserBase<Impl>::ParseStatement(
case Token::WHILE: case Token::WHILE:
return ParseWhileStatement(labels, ok); return ParseWhileStatement(labels, ok);
case Token::FOR: case Token::FOR:
if (V8_UNLIKELY(allow_harmony_async_iteration() && is_async_function() && if (V8_UNLIKELY(is_async_function() && PeekAhead() == Token::AWAIT)) {
PeekAhead() == Token::AWAIT)) {
return ParseForAwaitStatement(labels, ok); return ParseForAwaitStatement(labels, ok);
} }
return ParseForStatement(labels, ok); return ParseForStatement(labels, ok);
...@@ -5955,7 +5950,6 @@ typename ParserBase<Impl>::StatementT ParserBase<Impl>::ParseForAwaitStatement( ...@@ -5955,7 +5950,6 @@ typename ParserBase<Impl>::StatementT ParserBase<Impl>::ParseForAwaitStatement(
ZoneList<const AstRawString*>* labels, bool* ok) { ZoneList<const AstRawString*>* labels, bool* ok) {
// for await '(' ForDeclaration of AssignmentExpression ')' // for await '(' ForDeclaration of AssignmentExpression ')'
DCHECK(is_async_function()); DCHECK(is_async_function());
DCHECK(allow_harmony_async_iteration());
int stmt_pos = peek_position(); int stmt_pos = peek_position();
......
...@@ -546,7 +546,6 @@ Parser::Parser(ParseInfo* info) ...@@ -546,7 +546,6 @@ Parser::Parser(ParseInfo* info)
set_allow_harmony_static_fields(FLAG_harmony_static_fields); set_allow_harmony_static_fields(FLAG_harmony_static_fields);
set_allow_harmony_dynamic_import(FLAG_harmony_dynamic_import); set_allow_harmony_dynamic_import(FLAG_harmony_dynamic_import);
set_allow_harmony_import_meta(FLAG_harmony_import_meta); set_allow_harmony_import_meta(FLAG_harmony_import_meta);
set_allow_harmony_async_iteration(FLAG_harmony_async_iteration);
set_allow_harmony_bigint(FLAG_harmony_bigint); set_allow_harmony_bigint(FLAG_harmony_bigint);
set_allow_harmony_optional_catch_binding(FLAG_harmony_optional_catch_binding); set_allow_harmony_optional_catch_binding(FLAG_harmony_optional_catch_binding);
for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount;
......
...@@ -304,7 +304,6 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) { ...@@ -304,7 +304,6 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
SET_ALLOW(harmony_static_fields); SET_ALLOW(harmony_static_fields);
SET_ALLOW(harmony_dynamic_import); SET_ALLOW(harmony_dynamic_import);
SET_ALLOW(harmony_import_meta); SET_ALLOW(harmony_import_meta);
SET_ALLOW(harmony_async_iteration);
SET_ALLOW(harmony_bigint); SET_ALLOW(harmony_bigint);
SET_ALLOW(harmony_optional_catch_binding); SET_ALLOW(harmony_optional_catch_binding);
#undef SET_ALLOW #undef SET_ALLOW
......
...@@ -415,7 +415,6 @@ void GenerateExpectationsFile(std::ostream& stream, // NOLINT ...@@ -415,7 +415,6 @@ void GenerateExpectationsFile(std::ostream& stream, // NOLINT
} }
if (options.do_expressions()) i::FLAG_harmony_do_expressions = true; if (options.do_expressions()) i::FLAG_harmony_do_expressions = true;
if (options.async_iteration()) i::FLAG_harmony_async_iteration = true;
if (options.public_fields()) i::FLAG_harmony_public_fields = true; if (options.public_fields()) i::FLAG_harmony_public_fields = true;
if (options.static_fields()) i::FLAG_harmony_static_fields = true; if (options.static_fields()) i::FLAG_harmony_static_fields = true;
...@@ -426,7 +425,6 @@ void GenerateExpectationsFile(std::ostream& stream, // NOLINT ...@@ -426,7 +425,6 @@ void GenerateExpectationsFile(std::ostream& stream, // NOLINT
} }
i::FLAG_harmony_do_expressions = false; i::FLAG_harmony_do_expressions = false;
i::FLAG_harmony_async_iteration = false;
i::FLAG_harmony_public_fields = false; i::FLAG_harmony_public_fields = false;
i::FLAG_harmony_static_fields = false; i::FLAG_harmony_static_fields = false;
} }
...@@ -475,7 +473,6 @@ void PrintUsage(const char* exec_path) { ...@@ -475,7 +473,6 @@ void PrintUsage(const char* exec_path) {
"Specify the name of the test function.\n" "Specify the name of the test function.\n"
" --top-level Process top level code, not the top-level function.\n" " --top-level Process top level code, not the top-level function.\n"
" --do-expressions Enable harmony_do_expressions flag.\n" " --do-expressions Enable harmony_do_expressions flag.\n"
" --async-iteration Enable harmony_async_iteration flag.\n"
" --public-fields Enable harmony_public_fields flag.\n" " --public-fields Enable harmony_public_fields flag.\n"
" --static-fields Enable harmony_static_fields flag.\n" " --static-fields Enable harmony_static_fields flag.\n"
" --output=file.name\n" " --output=file.name\n"
......
...@@ -2380,8 +2380,6 @@ TEST(Generators) { ...@@ -2380,8 +2380,6 @@ TEST(Generators) {
} }
TEST(AsyncGenerators) { TEST(AsyncGenerators) {
bool old_flag = i::FLAG_harmony_async_iteration;
i::FLAG_harmony_async_iteration = true;
InitializedIgnitionHandleScope scope; InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate()); BytecodeExpectationsPrinter printer(CcTest::isolate());
printer.set_wrap(false); printer.set_wrap(false);
...@@ -2404,7 +2402,6 @@ TEST(AsyncGenerators) { ...@@ -2404,7 +2402,6 @@ TEST(AsyncGenerators) {
CHECK(CompareTexts(BuildActual(printer, snippets), CHECK(CompareTexts(BuildActual(printer, snippets),
LoadGolden("AsyncGenerators.golden"))); LoadGolden("AsyncGenerators.golden")));
i::FLAG_harmony_async_iteration = old_flag;
} }
TEST(Modules) { TEST(Modules) {
...@@ -2522,8 +2519,6 @@ TEST(NewAndSpread) { ...@@ -2522,8 +2519,6 @@ TEST(NewAndSpread) {
} }
TEST(ForAwaitOf) { TEST(ForAwaitOf) {
bool old_flag = i::FLAG_harmony_async_iteration;
i::FLAG_harmony_async_iteration = true;
InitializedIgnitionHandleScope scope; InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate()); BytecodeExpectationsPrinter printer(CcTest::isolate());
printer.set_wrap(false); printer.set_wrap(false);
...@@ -2556,8 +2551,6 @@ TEST(ForAwaitOf) { ...@@ -2556,8 +2551,6 @@ TEST(ForAwaitOf) {
CHECK(CompareTexts(BuildActual(printer, snippets), CHECK(CompareTexts(BuildActual(printer, snippets),
LoadGolden("ForAwaitOf.golden"))); LoadGolden("ForAwaitOf.golden")));
i::FLAG_harmony_async_iteration = old_flag;
} }
TEST(StandardForLoop) { TEST(StandardForLoop) {
......
...@@ -1317,7 +1317,6 @@ enum ParserFlag { ...@@ -1317,7 +1317,6 @@ enum ParserFlag {
kAllowHarmonyPublicFields, kAllowHarmonyPublicFields,
kAllowHarmonyStaticFields, kAllowHarmonyStaticFields,
kAllowHarmonyDynamicImport, kAllowHarmonyDynamicImport,
kAllowHarmonyAsyncIteration,
kAllowHarmonyImportMeta, kAllowHarmonyImportMeta,
kAllowHarmonyDoExpressions, kAllowHarmonyDoExpressions,
kAllowHarmonyOptionalCatchBinding, kAllowHarmonyOptionalCatchBinding,
...@@ -1336,7 +1335,6 @@ void SetGlobalFlags(i::EnumSet<ParserFlag> flags) { ...@@ -1336,7 +1335,6 @@ void SetGlobalFlags(i::EnumSet<ParserFlag> flags) {
i::FLAG_harmony_static_fields = flags.Contains(kAllowHarmonyStaticFields); i::FLAG_harmony_static_fields = flags.Contains(kAllowHarmonyStaticFields);
i::FLAG_harmony_dynamic_import = flags.Contains(kAllowHarmonyDynamicImport); i::FLAG_harmony_dynamic_import = flags.Contains(kAllowHarmonyDynamicImport);
i::FLAG_harmony_import_meta = flags.Contains(kAllowHarmonyImportMeta); i::FLAG_harmony_import_meta = flags.Contains(kAllowHarmonyImportMeta);
i::FLAG_harmony_async_iteration = flags.Contains(kAllowHarmonyAsyncIteration);
i::FLAG_harmony_do_expressions = flags.Contains(kAllowHarmonyDoExpressions); i::FLAG_harmony_do_expressions = flags.Contains(kAllowHarmonyDoExpressions);
i::FLAG_harmony_optional_catch_binding = i::FLAG_harmony_optional_catch_binding =
flags.Contains(kAllowHarmonyOptionalCatchBinding); flags.Contains(kAllowHarmonyOptionalCatchBinding);
...@@ -1354,8 +1352,6 @@ void SetParserFlags(i::PreParser* parser, i::EnumSet<ParserFlag> flags) { ...@@ -1354,8 +1352,6 @@ void SetParserFlags(i::PreParser* parser, i::EnumSet<ParserFlag> flags) {
flags.Contains(kAllowHarmonyDynamicImport)); flags.Contains(kAllowHarmonyDynamicImport));
parser->set_allow_harmony_import_meta( parser->set_allow_harmony_import_meta(
flags.Contains(kAllowHarmonyImportMeta)); flags.Contains(kAllowHarmonyImportMeta));
parser->set_allow_harmony_async_iteration(
flags.Contains(kAllowHarmonyAsyncIteration));
parser->set_allow_harmony_do_expressions( parser->set_allow_harmony_do_expressions(
flags.Contains(kAllowHarmonyDoExpressions)); flags.Contains(kAllowHarmonyDoExpressions));
parser->set_allow_harmony_optional_catch_binding( parser->set_allow_harmony_optional_catch_binding(
...@@ -2633,7 +2629,6 @@ TEST(ErrorsObjectLiteralChecking) { ...@@ -2633,7 +2629,6 @@ TEST(ErrorsObjectLiteralChecking) {
"static async get x : 0", "static async get x : 0",
"async static x(){}", "async static x(){}",
"*async x(){}", "*async x(){}",
"async *x(){}",
"async x*(){}", "async x*(){}",
"async x : 0", "async x : 0",
"async 0 : 0", "async 0 : 0",
...@@ -4688,6 +4683,7 @@ TEST(ClassBodyNoErrors) { ...@@ -4688,6 +4683,7 @@ TEST(ClassBodyNoErrors) {
"*g() {};", "*g() {};",
"; *g() {}", "; *g() {}",
"*g() {}; *h(x) {}", "*g() {}; *h(x) {}",
"async *x(){}",
"static() {}", "static() {}",
"get static() {}", "get static() {}",
"set static(v) {}", "set static(v) {}",
...@@ -4708,6 +4704,7 @@ TEST(ClassBodyNoErrors) { ...@@ -4708,6 +4704,7 @@ TEST(ClassBodyNoErrors) {
"*async(){}", "*async(){}",
"static async(){}", "static async(){}",
"static *async(){}", "static *async(){}",
"static async *x(){}",
// Escaped 'static' should be allowed anywhere // Escaped 'static' should be allowed anywhere
// static-as-PropertyName is. // static-as-PropertyName is.
...@@ -5107,7 +5104,6 @@ TEST(ClassAsyncErrors) { ...@@ -5107,7 +5104,6 @@ TEST(ClassAsyncErrors) {
const char* async_data[] = { const char* async_data[] = {
"*async x(){}", "*async x(){}",
"async *(){}", "async *(){}",
"async *x(){}",
"async get x(){}", "async get x(){}",
"async set x(y){}", "async set x(y){}",
"async x : 0", "async x : 0",
...@@ -5117,7 +5113,6 @@ TEST(ClassAsyncErrors) { ...@@ -5117,7 +5113,6 @@ TEST(ClassAsyncErrors) {
"static *async x(){}", "static *async x(){}",
"static async *(){}", "static async *(){}",
"static async *x(){}",
"static async get x(){}", "static async get x(){}",
"static async set x(y){}", "static async set x(y){}",
"static async x : 0", "static async x : 0",
...@@ -7131,19 +7126,12 @@ TEST(DestructuringNegativeTests) { ...@@ -7131,19 +7126,12 @@ TEST(DestructuringNegativeTests) {
"{...[ x = 5 ] }", "{...[ x = 5 ] }",
"{...x.f }", "{...x.f }",
"{...x[0] }", "{...x[0] }",
"async function* a() {}",
nullptr nullptr
}; };
const char* async_gen_data[] = {
"async function* a() {}",
nullptr
};
// clang-format on // clang-format on
RunParserSyncTest(context_data, data, kError); RunParserSyncTest(context_data, data, kError);
static const ParserFlag async_gen_flags[] = {kAllowHarmonyAsyncIteration};
RunParserSyncTest(context_data, async_gen_data, kError, nullptr, 0,
async_gen_flags, arraysize(async_gen_flags));
} }
{ // All modes. { // All modes.
...@@ -8399,6 +8387,8 @@ TEST(FunctionDeclarationError) { ...@@ -8399,6 +8387,8 @@ TEST(FunctionDeclarationError) {
"label: function* f() { }", "label: function* f() { }",
"if (true) async function f() { }", "if (true) async function f() { }",
"label: async function f() { }", "label: async function f() { }",
"if (true) async function* f() { }",
"label: async function* f() { }",
nullptr nullptr
}; };
// Valid only in sloppy mode. // Valid only in sloppy mode.
...@@ -8420,20 +8410,6 @@ TEST(FunctionDeclarationError) { ...@@ -8420,20 +8410,6 @@ TEST(FunctionDeclarationError) {
// In sloppy mode, sloppy_data is successful // In sloppy mode, sloppy_data is successful
RunParserSyncTest(sloppy_context, error_data, kError); RunParserSyncTest(sloppy_context, error_data, kError);
RunParserSyncTest(sloppy_context, sloppy_data, kSuccess); RunParserSyncTest(sloppy_context, sloppy_data, kSuccess);
// No single statement async iterators
// clang-format off
const char* async_iterator_data[] = {
"if (true) async function* f() { }",
"label: async function* f() { }",
nullptr,
};
// clang-format on
static const ParserFlag flags[] = {kAllowHarmonyAsyncIteration};
RunParserSyncTest(sloppy_context, async_iterator_data, kError, nullptr, 0,
flags, arraysize(flags));
RunParserSyncTest(strict_context, async_iterator_data, kError, nullptr, 0,
flags, arraysize(flags));
} }
TEST(ExponentiationOperator) { TEST(ExponentiationOperator) {
...@@ -8599,6 +8575,9 @@ TEST(AsyncAwait) { ...@@ -8599,6 +8575,9 @@ TEST(AsyncAwait) {
"var O = { method(await) { return await; } };", "var O = { method(await) { return await; } };",
"var O = { *method() { var await = 1; return await; } };", "var O = { *method() { var await = 1; return await; } };",
"var O = { *method(await) { return await; } };", "var O = { *method(await) { return await; } };",
"var asyncFn = async function*() {}",
"async function* f() {}",
"var O = { async *method() {} };",
"(function await() {})", "(function await() {})",
nullptr nullptr
...@@ -8637,10 +8616,7 @@ TEST(AsyncAwaitErrors) { ...@@ -8637,10 +8616,7 @@ TEST(AsyncAwaitErrors) {
"var f = async() => await;", "var f = async() => await;",
"var asyncFn = async function*() {}",
"async function* f() {}",
"var O = { *async method() {} };", "var O = { *async method() {} };",
"var O = { async *method() {} };",
"var O = { async method*() {} };", "var O = { async method*() {} };",
"var asyncFn = async function(x = await 1) { return x; }", "var asyncFn = async function(x = await 1) { return x; }",
...@@ -9579,24 +9555,18 @@ TEST(ForAwaitOf) { ...@@ -9579,24 +9555,18 @@ TEST(ForAwaitOf) {
nullptr nullptr
}; };
// clang-format on // clang-format on
static const ParserFlag always_flags[] = {kAllowHarmonyAsyncIteration}; RunParserSyncTest(context_data, expr_data, kSuccess);
RunParserSyncTest(context_data, expr_data, kSuccess, nullptr, 0, always_flags, RunParserSyncTest(context_data2, expr_data, kSuccess);
arraysize(always_flags));
RunParserSyncTest(context_data2, expr_data, kSuccess, nullptr, 0,
always_flags, arraysize(always_flags));
RunParserSyncTest(context_data, var_data, kSuccess, nullptr, 0, always_flags, RunParserSyncTest(context_data, var_data, kSuccess);
arraysize(always_flags));
// TODO(marja): PreParser doesn't report early errors. // TODO(marja): PreParser doesn't report early errors.
// (https://bugs.chromium.org/p/v8/issues/detail?id=2728) // (https://bugs.chromium.org/p/v8/issues/detail?id=2728)
// RunParserSyncTest(context_data2, var_data, kError, nullptr, 0, // RunParserSyncTest(context_data2, var_data, kError, nullptr, 0,
// always_flags, // always_flags,
// arraysize(always_flags)); // arraysize(always_flags));
RunParserSyncTest(context_data, lexical_data, kSuccess, nullptr, 0, RunParserSyncTest(context_data, lexical_data, kSuccess);
always_flags, arraysize(always_flags)); RunParserSyncTest(context_data2, lexical_data, kSuccess);
RunParserSyncTest(context_data2, lexical_data, kSuccess, nullptr, 0,
always_flags, arraysize(always_flags));
} }
TEST(ForAwaitOfErrors) { TEST(ForAwaitOfErrors) {
...@@ -9757,9 +9727,7 @@ TEST(ForAwaitOfErrors) { ...@@ -9757,9 +9727,7 @@ TEST(ForAwaitOfErrors) {
nullptr nullptr
}; };
// clang-format on // clang-format on
static const ParserFlag always_flags[] = {kAllowHarmonyAsyncIteration}; RunParserSyncTest(context_data, data, kError);
RunParserSyncTest(context_data, data, kError, nullptr, 0, always_flags,
arraysize(always_flags));
} }
TEST(ForAwaitOfFunctionDeclaration) { TEST(ForAwaitOfFunctionDeclaration) {
...@@ -9782,9 +9750,7 @@ TEST(ForAwaitOfFunctionDeclaration) { ...@@ -9782,9 +9750,7 @@ TEST(ForAwaitOfFunctionDeclaration) {
}; };
// clang-format on // clang-format on
static const ParserFlag always_flags[] = {kAllowHarmonyAsyncIteration}; RunParserSyncTest(context_data, data, kError);
RunParserSyncTest(context_data, data, kError, nullptr, 0, always_flags,
arraysize(always_flags));
} }
TEST(AsyncGenerator) { TEST(AsyncGenerator) {
...@@ -9881,9 +9847,7 @@ TEST(AsyncGenerator) { ...@@ -9881,9 +9847,7 @@ TEST(AsyncGenerator) {
}; };
// clang-format on // clang-format on
static const ParserFlag always_flags[] = {kAllowHarmonyAsyncIteration}; RunParserSyncTest(context_data, statement_data, kSuccess);
RunParserSyncTest(context_data, statement_data, kSuccess, nullptr, 0,
always_flags, arraysize(always_flags));
} }
TEST(AsyncGeneratorErrors) { TEST(AsyncGeneratorErrors) {
...@@ -9971,9 +9935,7 @@ TEST(AsyncGeneratorErrors) { ...@@ -9971,9 +9935,7 @@ TEST(AsyncGeneratorErrors) {
}; };
// clang-format on // clang-format on
static const ParserFlag always_flags[] = {kAllowHarmonyAsyncIteration}; RunParserSyncTest(context_data, statement_data, kError);
RunParserSyncTest(context_data, statement_data, kError, nullptr, 0,
always_flags, arraysize(always_flags));
} }
TEST(LexicalLoopVariable) { TEST(LexicalLoopVariable) {
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-async-iteration
let {session, contextGroup, Protocol} = InspectorTest.start('Checks that async chains for for-await-of are correct.'); let {session, contextGroup, Protocol} = InspectorTest.start('Checks that async chains for for-await-of are correct.');
contextGroup.addScript(` contextGroup.addScript(`
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --allow-natives-syntax --no-always-opt --harmony-async-iteration // Flags: --allow-natives-syntax --no-always-opt
// Flags: --no-opt // Flags: --no-opt
// Files: test/mjsunit/code-coverage-utils.js // Files: test/mjsunit/code-coverage-utils.js
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --allow-natives-syntax --no-always-opt --harmony-async-iteration --opt // Flags: --allow-natives-syntax --no-always-opt --opt
// Files: test/mjsunit/code-coverage-utils.js // Files: test/mjsunit/code-coverage-utils.js
%DebugToggleBlockCoverage(true); %DebugToggleBlockCoverage(true);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --allow-natives-syntax --no-always-opt --harmony-async-iteration // Flags: --allow-natives-syntax --no-always-opt
// Files: test/mjsunit/code-coverage-utils.js // Files: test/mjsunit/code-coverage-utils.js
%DebugToggleBlockCoverage(true); %DebugToggleBlockCoverage(true);
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-async-iteration
function ID(x) { function ID(x) {
return x; return x;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --allow-unsafe-function-constructor --harmony-async-iteration // Flags: --allow-unsafe-function-constructor
(function testReflectConstructArity() { (function testReflectConstructArity() {
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-async-iteration
var done = false; var done = false;
async function f() { async function f() {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-async-iteration --allow-natives-syntax // Flags: --allow-natives-syntax
let testFailed = false; let testFailed = false;
let testFailure; let testFailure;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-async-iteration --allow-natives-syntax // Flags: --allow-natives-syntax
function assertThrowsAsync(run, errorType, message) { function assertThrowsAsync(run, errorType, message) {
var actual; var actual;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-async-iteration --allow-natives-syntax // Flags: --allow-natives-syntax
// .return() from state suspendedStart with undefined // .return() from state suspendedStart with undefined
testAsync(test => { testAsync(test => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-async-iteration --allow-natives-syntax // Flags: --allow-natives-syntax
testAsync(test => { testAsync(test => {
test.plan(2); test.plan(2);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-async-iteration --allow-natives-syntax // Flags: --allow-natives-syntax
// Yield a thenable which is never settled // Yield a thenable which is never settled
testAsync(test => { testAsync(test => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-async-iteration --allow-natives-syntax // Flags: --allow-natives-syntax
let testFailed = false; let testFailed = false;
let testFailure; let testFailure;
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-async-iteration
// Crash with --verify-heap // Crash with --verify-heap
(async function() { for await (let { a = class b { } } of [{}]) { } })(); (async function() { for await (let { a = class b { } } of [{}]) { } })();
(async function() { var a; for await ({ a = class b { } } of [{}]) { } })(); (async function() { var a; for await ({ a = class b { } } of [{}]) { } })();
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --allow-natives-syntax --harmony-async-iteration // Flags: --allow-natives-syntax
async function* gen([[notIterable]] = [null]) {} async function* gen([[notIterable]] = [null]) {}
assertThrows(() => gen(), TypeError); assertThrows(() => gen(), TypeError);
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-async-iteration
assertTrue(Symbol.hasOwnProperty('asyncIterator')); assertTrue(Symbol.hasOwnProperty('asyncIterator'));
assertEquals('symbol', typeof Symbol.asyncIterator); assertEquals('symbol', typeof Symbol.asyncIterator);
assertInstanceof(Object(Symbol.asyncIterator), Symbol); assertInstanceof(Object(Symbol.asyncIterator), Symbol);
......
...@@ -43,7 +43,6 @@ from testrunner.outproc import test262 ...@@ -43,7 +43,6 @@ from testrunner.outproc import test262
# TODO(littledan): move the flag mapping into the status file # TODO(littledan): move the flag mapping into the status file
FEATURE_FLAGS = { FEATURE_FLAGS = {
'async-iteration': '--harmony-async-iteration',
'BigInt': '--harmony-bigint', 'BigInt': '--harmony-bigint',
'regexp-named-groups': '--harmony-regexp-named-captures', 'regexp-named-groups': '--harmony-regexp-named-captures',
'regexp-unicode-property-escapes': '--harmony-regexp-property', 'regexp-unicode-property-escapes': '--harmony-regexp-property',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment