summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--js/src/frontend/Parser.cpp20
-rw-r--r--js/src/js.msg1
2 files changed, 0 insertions, 21 deletions
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<ParseHandler>::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<ParseHandler>::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<ParseHandler>::forStatement(YieldHandling yieldHandling)
}
}
-#ifndef RELEASE_OR_BETA
if (pc->isAsync()) {
bool matched;
if (!tokenStream.matchToken(&matched, TOK_AWAIT))
@@ -6167,7 +6154,6 @@ Parser<ParseHandler>::forStatement(YieldHandling yieldHandling)
iterKind = IteratorKind::Async;
}
}
-#endif
MUST_MATCH_TOKEN(TOK_LP, JSMSG_PAREN_AFTER_FOR);
@@ -9520,12 +9506,6 @@ Parser<ParseHandler>::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(&ltok))
return null();
diff --git a/js/src/js.msg b/js/src/js.msg
index f8e5358bb..9dc5f4e9f 100644
--- a/js/src/js.msg
+++ b/js/src/js.msg
@@ -185,7 +185,6 @@ MSG_DEF(JSMSG_ARRAY_COMP_LEFTSIDE, 0, JSEXN_SYNTAXERR, "invalid array compre
MSG_DEF(JSMSG_ARRAY_INIT_TOO_BIG, 0, JSEXN_INTERNALERR, "array initializer too large")
MSG_DEF(JSMSG_AS_AFTER_IMPORT_STAR, 0, JSEXN_SYNTAXERR, "missing keyword 'as' after import *")
MSG_DEF(JSMSG_AS_AFTER_RESERVED_WORD, 1, JSEXN_SYNTAXERR, "missing keyword 'as' after reserved word '{0}'")
-MSG_DEF(JSMSG_ASYNC_GENERATOR, 0, JSEXN_SYNTAXERR, "generator function or method can't be async")
MSG_DEF(JSMSG_AWAIT_IN_DEFAULT, 0, JSEXN_SYNTAXERR, "await can't be used in default expression")
MSG_DEF(JSMSG_AWAIT_OUTSIDE_ASYNC, 0, JSEXN_SYNTAXERR, "await is only valid in async functions")
MSG_DEF(JSMSG_BAD_ARROW_ARGS, 0, JSEXN_SYNTAXERR, "invalid arrow-function arguments (parentheses around the arrow-function may help)")