From c9bddfca7eb5ef4642bdd8f27e35b9e2f4de65c9 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 14 Dec 2019 10:42:18 -0500 Subject: Bug 1352312 - Enable Async Iteration. Tag #1287 --- js/src/frontend/Parser.cpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'js/src/frontend') diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index 2d2f17fd1..cf9f1e27c 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -3785,12 +3785,6 @@ Parser::functionStmt(uint32_t toStringStart, YieldHandling yieldHa GeneratorKind generatorKind = NotGenerator; if (tt == TOK_MUL) { -#ifdef RELEASE_OR_BETA - if (asyncKind != SyncFunction) { - error(JSMSG_ASYNC_GENERATOR); - return null(); - } -#endif generatorKind = StarGenerator; if (!tokenStream.getToken(&tt)) return null(); @@ -3859,12 +3853,6 @@ Parser::functionExpr(uint32_t toStringStart, InvokedPrediction inv return null(); if (tt == TOK_MUL) { -#ifdef RELEASE_OR_BETA - if (asyncKind != SyncFunction) { - error(JSMSG_ASYNC_GENERATOR); - return null(); - } -#endif generatorKind = StarGenerator; if (!tokenStream.getToken(&tt)) return null(); @@ -6156,7 +6144,6 @@ Parser::forStatement(YieldHandling yieldHandling) } } -#ifndef RELEASE_OR_BETA if (pc->isAsync()) { bool matched; if (!tokenStream.matchToken(&matched, TOK_AWAIT)) @@ -6167,7 +6154,6 @@ Parser::forStatement(YieldHandling yieldHandling) iterKind = IteratorKind::Async; } } -#endif MUST_MATCH_TOKEN(TOK_LP, JSMSG_PAREN_AFTER_FOR); @@ -9520,12 +9506,6 @@ Parser::propertyName(YieldHandling yieldHandling, } if (ltok == TOK_MUL) { -#ifdef RELEASE_OR_BETA - if (isAsync) { - error(JSMSG_ASYNC_GENERATOR); - return null(); - } -#endif isGenerator = true; if (!tokenStream.getToken(<ok)) return null(); -- cgit v1.2.3