Bug 1498488 - Drop support for destructuring/rest parameter. r=Yoric
authorTooru Fujisawa <arai_a@mac.com>
Mon, 15 Oct 2018 23:51:50 +0900
changeset 497080 b247b5dd6a8ae77da265c032bc75b413f9bc3ffc
parent 497079 cd6a56ce613caf1e103b4d51503de6bce2cdee26
child 497081 ccf6f87d34302b01ff38c1934f70a906ab0e4184
push id9996
push userarchaeopteryx@coole-files.de
push dateThu, 18 Oct 2018 18:37:15 +0000
treeherdermozilla-beta@8efe26839243 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersYoric
bugs1498488
milestone64.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 1498488 - Drop support for destructuring/rest parameter. r=Yoric
js/src/frontend/BinSource-auto.cpp
js/src/frontend/BinSource-auto.h
js/src/frontend/BinSource.cpp
js/src/frontend/BinSource.yaml
js/src/frontend/binsource/src/main.rs
--- a/js/src/frontend/BinSource-auto.cpp
+++ b/js/src/frontend/BinSource-auto.cpp
@@ -68,27 +68,23 @@ BinASTParser<Tok>::parseAssertedMaybePos
 template<typename Tok> JS::Result<Ok>
 BinASTParser<Tok>::parseSumAssertedMaybePositionalParameterName(const size_t start, const BinKind kind, const BinFields& fields,
         AssertedScopeKind scopeKind,
         MutableHandle<GCVector<JSAtom*>> positionalParams)
 {
     Ok result;
     switch (kind) {
       case BinKind::AssertedParameterName:
-        MOZ_TRY_VAR(result, parseInterfaceAssertedParameterName(start, kind, fields,
-            scopeKind, positionalParams));
-        break;
+        return raiseError("FIXME: Not implemented yet in this preview release (AssertedParameterName)");
       case BinKind::AssertedPositionalParameterName:
         MOZ_TRY_VAR(result, parseInterfaceAssertedPositionalParameterName(start, kind, fields,
             scopeKind, positionalParams));
         break;
       case BinKind::AssertedRestParameterName:
-        MOZ_TRY_VAR(result, parseInterfaceAssertedRestParameterName(start, kind, fields,
-            scopeKind, positionalParams));
-        break;
+        return raiseError("FIXME: Not implemented yet in this preview release (AssertedRestParameterName)");
       default:
         return raiseInvalidKind("AssertedMaybePositionalParameterName", kind);
     }
     return result;
 }
 
 /*
 AssignmentTarget ::= ArrayAssignmentTarget
@@ -1930,23 +1926,23 @@ BinASTParser<Tok>::parseSumVariableDecla
 
 
 
 // ----- Interfaces (autogenerated, by lexicographical order)
 // When fields have a non-trivial type, implementation is deanonymized and delegated to another parser.
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceArrayAssignmentTarget(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ArrayAssignmentTarget)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ArrayAssignmentTarget)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceArrayBinding(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ArrayBinding)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ArrayBinding)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceArrayExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::ArrayExpression);
     BINJS_TRY(CheckRecursionLimit(cx_));
 
@@ -1989,17 +1985,17 @@ BinASTParser<Tok>::parseArrowExpressionC
     MOZ_TRY(guard.done());
 
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceArrowExpressionContentsWithExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ArrowExpressionContentsWithExpression)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ArrowExpressionContentsWithExpression)");
 }
 
 
 /*
  interface ArrowExpressionContentsWithFunctionBody : Node {
     AssertedParameterScope parameterScope;
     FormalParameters params;
     AssertedVarScope bodyScope;
@@ -2022,17 +2018,17 @@ BinASTParser<Tok>::parseArrowExpressionC
     MOZ_TRY(guard.done());
 
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceArrowExpressionContentsWithFunctionBody(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ArrowExpressionContentsWithFunctionBody)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ArrowExpressionContentsWithFunctionBody)");
 }
 
 
 /*
  interface AssertedBlockScope : Node {
     FrozenArray<AssertedDeclaredName> declaredNames;
     bool hasDirectEval;
  }
@@ -2238,39 +2234,20 @@ BinASTParser<Tok>::parseInterfaceAsserte
     ParseContext::Scope* scope;
     DeclarationKind declKind;
     MOZ_TRY(getDeclaredScope(scopeKind, kind_, scope, declKind));
     MOZ_TRY(addScopeName(scopeKind, name, scope, declKind, isCaptured));
     auto result = Ok();
     return result;
 }
 
-template<typename Tok> JS::Result<Ok>
-BinASTParser<Tok>::parseInterfaceAssertedParameterName(const size_t start, const BinKind kind, const BinFields& fields,
-        AssertedScopeKind scopeKind,
-        MutableHandle<GCVector<JSAtom*>> positionalParams)
-{
-    MOZ_ASSERT(kind == BinKind::AssertedParameterName);
-    BINJS_TRY(CheckRecursionLimit(cx_));
-
-#if defined(DEBUG)
-    const BinField expected_fields[2] = { BinField::Name, BinField::IsCaptured };
-    MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
-#endif // defined(DEBUG)
-
-    RootedAtom name(cx_);
-    MOZ_TRY_VAR(name, tokenizer_->readIdentifierName());
-
-    BINJS_MOZ_TRY_DECL(isCaptured, tokenizer_->readBool());
-    ParseContext::Scope* scope;
-    DeclarationKind declKind;
-    MOZ_TRY(getBoundScope(scopeKind, scope, declKind));
-    MOZ_TRY(addScopeName(scopeKind, name, scope, declKind, isCaptured));
-    auto result = Ok();
-    return result;
+template<typename Tok> JS::Result<ParseNode*>
+BinASTParser<Tok>::parseInterfaceAssertedParameterName(const size_t start, const BinKind kind, const BinFields& fields)
+{
+    return raiseError("FIXME: Not implemented yet in this preview release (AssertedParameterName)");
 }
 
 
 /*
  interface AssertedParameterScope : Node {
     FrozenArray<AssertedMaybePositionalParameterName> paramNames;
     bool hasDirectEval;
     bool isSimpleParameterList;
@@ -2370,39 +2347,20 @@ BinASTParser<Tok>::parseInterfaceAsserte
     ParseContext::Scope* scope;
     DeclarationKind declKind;
     MOZ_TRY(getBoundScope(scopeKind, scope, declKind));
     MOZ_TRY(addScopeName(scopeKind, name, scope, declKind, isCaptured));
     auto result = Ok();
     return result;
 }
 
-template<typename Tok> JS::Result<Ok>
-BinASTParser<Tok>::parseInterfaceAssertedRestParameterName(const size_t start, const BinKind kind, const BinFields& fields,
-        AssertedScopeKind scopeKind,
-        MutableHandle<GCVector<JSAtom*>> positionalParams)
-{
-    MOZ_ASSERT(kind == BinKind::AssertedRestParameterName);
-    BINJS_TRY(CheckRecursionLimit(cx_));
-
-#if defined(DEBUG)
-    const BinField expected_fields[2] = { BinField::Name, BinField::IsCaptured };
-    MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
-#endif // defined(DEBUG)
-
-    RootedAtom name(cx_);
-    MOZ_TRY_VAR(name, tokenizer_->readIdentifierName());
-
-    BINJS_MOZ_TRY_DECL(isCaptured, tokenizer_->readBool());
-    ParseContext::Scope* scope;
-    DeclarationKind declKind;
-    MOZ_TRY(getBoundScope(scopeKind, scope, declKind));
-    MOZ_TRY(addScopeName(scopeKind, name, scope, declKind, isCaptured));
-    auto result = Ok();
-    return result;
+template<typename Tok> JS::Result<ParseNode*>
+BinASTParser<Tok>::parseInterfaceAssertedRestParameterName(const size_t start, const BinKind kind, const BinFields& fields)
+{
+    return raiseError("FIXME: Not implemented yet in this preview release (AssertedRestParameterName)");
 }
 
 
 /*
  interface AssertedScriptGlobalScope : Node {
     FrozenArray<AssertedDeclaredName> declaredNames;
     bool hasDirectEval;
  }
@@ -2571,35 +2529,35 @@ BinASTParser<Tok>::parseInterfaceAssignm
     BINJS_TRY(usedNames_.noteUse(cx_, name, parseContext_->scriptId(), parseContext_->innermostScope()->id()));
     BINJS_TRY_DECL(result, factory_.newName(name->asPropertyName(), tokenizer_->pos(start), cx_));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceAssignmentTargetPropertyIdentifier(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (AssignmentTargetPropertyIdentifier)");
+    return raiseError("FIXME: Not implemented yet in this preview release (AssignmentTargetPropertyIdentifier)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceAssignmentTargetPropertyProperty(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (AssignmentTargetPropertyProperty)");
+    return raiseError("FIXME: Not implemented yet in this preview release (AssignmentTargetPropertyProperty)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceAssignmentTargetWithInitializer(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (AssignmentTargetWithInitializer)");
+    return raiseError("FIXME: Not implemented yet in this preview release (AssignmentTargetWithInitializer)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceAwaitExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (AwaitExpression)");
+    return raiseError("FIXME: Not implemented yet in this preview release (AwaitExpression)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceBinaryExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::BinaryExpression);
     BINJS_TRY(CheckRecursionLimit(cx_));
 
@@ -2753,29 +2711,29 @@ BinASTParser<Tok>::parseInterfaceBinding
     }
     BINJS_TRY_DECL(result, factory_.newName(name->asPropertyName(), tokenizer_->pos(start), cx_));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceBindingPropertyIdentifier(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (BindingPropertyIdentifier)");
+    return raiseError("FIXME: Not implemented yet in this preview release (BindingPropertyIdentifier)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceBindingPropertyProperty(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (BindingPropertyProperty)");
+    return raiseError("FIXME: Not implemented yet in this preview release (BindingPropertyProperty)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceBindingWithInitializer(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (BindingWithInitializer)");
+    return raiseError("FIXME: Not implemented yet in this preview release (BindingWithInitializer)");
 }
 
 
 /*
  interface Block : Node {
     AssertedBlockScope scope;
     FrozenArray<Statement> statements;
  }
@@ -2952,17 +2910,17 @@ BinASTParser<Tok>::parseInterfaceCatchCl
     BINJS_TRY_DECL(result, factory_.newLexicalScope(*bindings, body));
     BINJS_TRY(factory_.setupCatchScope(result, binding, body));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceClassDeclaration(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ClassDeclaration)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ClassDeclaration)");
 }
 
 
 /*
  interface ClassElement : Node {
     bool isStatic;
     MethodDefinition method;
  }
@@ -2983,23 +2941,23 @@ BinASTParser<Tok>::parseClassElement()
     MOZ_TRY(guard.done());
 
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceClassElement(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ClassElement)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ClassElement)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceClassExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ClassExpression)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ClassExpression)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceCompoundAssignmentExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::CompoundAssignmentExpression);
     BINJS_TRY(CheckRecursionLimit(cx_));
 
@@ -3093,17 +3051,17 @@ BinASTParser<Tok>::parseInterfaceCompute
 
     BINJS_TRY_DECL(result, factory_.newPropertyByValue(object, expression, tokenizer_->offset()));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceComputedPropertyName(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ComputedPropertyName)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ComputedPropertyName)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceConditionalExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::ConditionalExpression);
     BINJS_TRY(CheckRecursionLimit(cx_));
 
@@ -3176,17 +3134,17 @@ BinASTParser<Tok>::parseInterfaceDataPro
 
     BINJS_TRY_DECL(result, factory_.newObjectMethodOrPropertyDefinition(name, expression, AccessorType::None));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceDebuggerStatement(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (DebuggerStatement)");
+    return raiseError("FIXME: Not implemented yet in this preview release (DebuggerStatement)");
 }
 
 
 /*
  interface Directive : Node {
     string rawValue;
  }
 */
@@ -3245,23 +3203,23 @@ BinASTParser<Tok>::parseInterfaceDoWhile
 
     BINJS_TRY_DECL(result, factory_.newDoWhileStatement(body, test, tokenizer_->pos(start)));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceEagerArrowExpressionWithExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (EagerArrowExpressionWithExpression)");
+    return raiseError("FIXME: Not implemented yet in this preview release (EagerArrowExpressionWithExpression)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceEagerArrowExpressionWithFunctionBody(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (EagerArrowExpressionWithFunctionBody)");
+    return raiseError("FIXME: Not implemented yet in this preview release (EagerArrowExpressionWithFunctionBody)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceEagerFunctionDeclaration(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::EagerFunctionDeclaration);
     BINJS_TRY(CheckRecursionLimit(cx_));
 
@@ -3523,35 +3481,35 @@ MOZ_TRY(tokenizer_->checkFields0(kind, f
 
     BINJS_TRY_DECL(result, factory_.newEmptyStatement(tokenizer_->pos(start)));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceExport(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (Export)");
+    return raiseError("FIXME: Not implemented yet in this preview release (Export)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceExportAllFrom(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ExportAllFrom)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ExportAllFrom)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceExportDefault(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ExportDefault)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ExportDefault)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceExportFrom(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ExportFrom)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ExportFrom)");
 }
 
 
 /*
  interface ExportFromSpecifier : Node {
     [IdentifierName] string name;
     [IdentifierName] string? exportedName;
  }
@@ -3572,17 +3530,17 @@ BinASTParser<Tok>::parseExportFromSpecif
     MOZ_TRY(guard.done());
 
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceExportFromSpecifier(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ExportFromSpecifier)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ExportFromSpecifier)");
 }
 
 
 /*
  interface ExportLocalSpecifier : Node {
     IdentifierExpression name;
     [PropertyKey] string? exportedName;
  }
@@ -3603,23 +3561,23 @@ BinASTParser<Tok>::parseExportLocalSpeci
     MOZ_TRY(guard.done());
 
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceExportLocalSpecifier(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ExportLocalSpecifier)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ExportLocalSpecifier)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceExportLocals(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ExportLocals)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ExportLocals)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceExpressionStatement(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::ExpressionStatement);
     BINJS_TRY(CheckRecursionLimit(cx_));
 
@@ -3695,17 +3653,17 @@ BinASTParser<Tok>::parseInterfaceForInSt
         BINJS_TRY_VAR(result, factory_.newLexicalScope(*bindings, result));
     }
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceForOfStatement(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ForOfStatement)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ForOfStatement)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceForStatement(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::ForStatement);
     BINJS_TRY(CheckRecursionLimit(cx_));
 
@@ -3777,18 +3735,17 @@ BinASTParser<Tok>::parseInterfaceFormalP
 #endif // defined(DEBUG)
 
     BINJS_MOZ_TRY_DECL(items, parseListOfParameter());
 
     BINJS_MOZ_TRY_DECL(rest, parseOptionalBinding());
 
     auto result = items;
     if (rest) {
-        BINJS_TRY_DECL(spread, factory_.newSpread(start, rest));
-        factory_.addList(result, spread);
+        return raiseError("Rest parameter is not supported in this preview release");
     }
     return result;
 }
 
 
 /*
  interface FunctionExpressionContents : Node {
     bool isFunctionNameCaptured;
@@ -4053,23 +4010,23 @@ BinASTParser<Tok>::parseInterfaceIfState
 
     BINJS_TRY_DECL(result, factory_.newIfStatement(start, test, consequent, alternate));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceImport(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (Import)");
+    return raiseError("FIXME: Not implemented yet in this preview release (Import)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceImportNamespace(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ImportNamespace)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ImportNamespace)");
 }
 
 
 /*
  interface ImportSpecifier : Node {
     [PropertyKey] string? name;
     BindingIdentifier binding;
  }
@@ -4090,17 +4047,17 @@ BinASTParser<Tok>::parseImportSpecifier(
     MOZ_TRY(guard.done());
 
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceImportSpecifier(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ImportSpecifier)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ImportSpecifier)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceLabelledStatement(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::LabelledStatement);
     BINJS_TRY(CheckRecursionLimit(cx_));
 
@@ -4119,23 +4076,23 @@ BinASTParser<Tok>::parseInterfaceLabelle
 
     BINJS_TRY_DECL(result, factory_.newLabeledStatement(label->asPropertyName(), body, start));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceLazyArrowExpressionWithExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (LazyArrowExpressionWithExpression)");
+    return raiseError("FIXME: Not implemented yet in this preview release (LazyArrowExpressionWithExpression)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceLazyArrowExpressionWithFunctionBody(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (LazyArrowExpressionWithFunctionBody)");
+    return raiseError("FIXME: Not implemented yet in this preview release (LazyArrowExpressionWithFunctionBody)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceLazyFunctionDeclaration(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::LazyFunctionDeclaration);
     BINJS_TRY(CheckRecursionLimit(cx_));
 
@@ -4239,29 +4196,29 @@ BinASTParser<Tok>::parseInterfaceLazyFun
 
     BINJS_MOZ_TRY_DECL(result, makeEmptyFunctionNode(skipStart, kind, funbox));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceLazyGetter(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (LazyGetter)");
+    return raiseError("FIXME: Not implemented yet in this preview release (LazyGetter)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceLazyMethod(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (LazyMethod)");
+    return raiseError("FIXME: Not implemented yet in this preview release (LazyMethod)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceLazySetter(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (LazySetter)");
+    return raiseError("FIXME: Not implemented yet in this preview release (LazySetter)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceLiteralBooleanExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::LiteralBooleanExpression);
     BINJS_TRY(CheckRecursionLimit(cx_));
 
@@ -4274,17 +4231,17 @@ BinASTParser<Tok>::parseInterfaceLiteral
 
     BINJS_TRY_DECL(result, factory_.newBooleanLiteral(value, tokenizer_->pos(start)));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceLiteralInfinityExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (LiteralInfinityExpression)");
+    return raiseError("FIXME: Not implemented yet in this preview release (LiteralInfinityExpression)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceLiteralNullExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::LiteralNullExpression);
     BINJS_TRY(CheckRecursionLimit(cx_));
 MOZ_TRY(tokenizer_->checkFields0(kind, fields));
@@ -4395,17 +4352,17 @@ BinASTParser<Tok>::parseInterfaceLiteral
 
     BINJS_TRY_DECL(result, factory_.newStringLiteral(value, tokenizer_->pos(start)));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceModule(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (Module)");
+    return raiseError("FIXME: Not implemented yet in this preview release (Module)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceNewExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::NewExpression);
     BINJS_TRY(CheckRecursionLimit(cx_));
 
@@ -4420,29 +4377,29 @@ BinASTParser<Tok>::parseInterfaceNewExpr
 
     BINJS_TRY_DECL(result, factory_.newNewExpression(tokenizer_->pos(start).begin, callee, arguments));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceNewTargetExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (NewTargetExpression)");
+    return raiseError("FIXME: Not implemented yet in this preview release (NewTargetExpression)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceObjectAssignmentTarget(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ObjectAssignmentTarget)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ObjectAssignmentTarget)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceObjectBinding(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (ObjectBinding)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ObjectBinding)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceObjectExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::ObjectExpression);
     BINJS_TRY(CheckRecursionLimit(cx_));
 
@@ -4587,17 +4544,17 @@ BinASTParser<Tok>::parseInterfaceShortha
 
     BINJS_TRY_DECL(result, factory_.newObjectMethodOrPropertyDefinition(name, name, AccessorType::None));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceSpreadElement(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (SpreadElement)");
+    return raiseError("FIXME: Not implemented yet in this preview release (SpreadElement)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceStaticMemberAssignmentTarget(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::StaticMemberAssignmentTarget);
     BINJS_TRY(CheckRecursionLimit(cx_));
 
@@ -4643,17 +4600,17 @@ BinASTParser<Tok>::parseInterfaceStaticM
     BINJS_TRY_DECL(name, factory_.newPropertyName(property->asPropertyName(), tokenizer_->pos(nameStart)));
     BINJS_TRY_DECL(result, factory_.newPropertyAccess(object, name));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceSuper(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (Super)");
+    return raiseError("FIXME: Not implemented yet in this preview release (Super)");
 }
 
 
 /*
  interface SwitchCase : Node {
     Expression test;
     FrozenArray<Statement> consequent;
  }
@@ -4787,23 +4744,23 @@ BinASTParser<Tok>::parseInterfaceSwitchS
     BINJS_TRY_DECL(scope, factory_.newLexicalScope(nullptr, cases));
     BINJS_TRY_DECL(result, factory_.newSwitchStatement(start, discriminant, scope, true));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceTemplateElement(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (TemplateElement)");
+    return raiseError("FIXME: Not implemented yet in this preview release (TemplateElement)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceTemplateExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (TemplateExpression)");
+    return raiseError("FIXME: Not implemented yet in this preview release (TemplateExpression)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceThisExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
     MOZ_ASSERT(kind == BinKind::ThisExpression);
     BINJS_TRY(CheckRecursionLimit(cx_));
 MOZ_TRY(tokenizer_->checkFields0(kind, fields));
@@ -5131,23 +5088,23 @@ BinASTParser<Tok>::parseInterfaceWithSta
 
     BINJS_TRY_DECL(result, factory_.newWithStatement(start, object, body));
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceYieldExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (YieldExpression)");
+    return raiseError("FIXME: Not implemented yet in this preview release (YieldExpression)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceYieldStarExpression(const size_t start, const BinKind kind, const BinFields& fields)
 {
-    return raiseError("FIXME: Not implemented yet (YieldStarExpression)");
+    return raiseError("FIXME: Not implemented yet in this preview release (YieldStarExpression)");
 }
 
 
 
 // ----- String enums (autogenerated, by lexicographical order)
 /*
 enum AssertedDeclaredKind {
     "var",
@@ -5509,35 +5466,35 @@ BinASTParser<Tok>::parseListOfAssertedMa
 
     MOZ_TRY(guard.done());
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseListOfAssignmentTargetOrAssignmentTargetWithInitializer()
 {
-    return raiseError("FIXME: Not implemented yet (ListOfAssignmentTargetOrAssignmentTargetWithInitializer)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ListOfAssignmentTargetOrAssignmentTargetWithInitializer)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseListOfAssignmentTargetProperty()
 {
-    return raiseError("FIXME: Not implemented yet (ListOfAssignmentTargetProperty)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ListOfAssignmentTargetProperty)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseListOfBindingProperty()
 {
-    return raiseError("FIXME: Not implemented yet (ListOfBindingProperty)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ListOfBindingProperty)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseListOfClassElement()
 {
-    return raiseError("FIXME: Not implemented yet (ListOfClassElement)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ListOfClassElement)");
 }
 
 template<typename Tok> JS::Result<ListNode*>
 BinASTParser<Tok>::parseListOfDirective()
 {
     uint32_t length;
     AutoList guard(*tokenizer_);
 
@@ -5552,41 +5509,41 @@ BinASTParser<Tok>::parseListOfDirective(
 
     MOZ_TRY(guard.done());
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseListOfExportFromSpecifier()
 {
-    return raiseError("FIXME: Not implemented yet (ListOfExportFromSpecifier)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ListOfExportFromSpecifier)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseListOfExportLocalSpecifier()
 {
-    return raiseError("FIXME: Not implemented yet (ListOfExportLocalSpecifier)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ListOfExportLocalSpecifier)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseListOfExpressionOrTemplateElement()
 {
-    return raiseError("FIXME: Not implemented yet (ListOfExpressionOrTemplateElement)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ListOfExpressionOrTemplateElement)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseListOfImportDeclarationOrExportDeclarationOrStatement()
 {
-    return raiseError("FIXME: Not implemented yet (ListOfImportDeclarationOrExportDeclarationOrStatement)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ListOfImportDeclarationOrExportDeclarationOrStatement)");
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseListOfImportSpecifier()
 {
-    return raiseError("FIXME: Not implemented yet (ListOfImportSpecifier)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ListOfImportSpecifier)");
 }
 
 template<typename Tok> JS::Result<ListNode*>
 BinASTParser<Tok>::parseListOfObjectProperty()
 {
     uint32_t length;
     AutoList guard(*tokenizer_);
 
@@ -5603,17 +5560,17 @@ BinASTParser<Tok>::parseListOfObjectProp
 
     MOZ_TRY(guard.done());
     return result;
 }
 
 template<typename Tok> JS::Result<ParseNode*>
 BinASTParser<Tok>::parseListOfOptionalBindingOrBindingWithInitializer()
 {
-    return raiseError("FIXME: Not implemented yet (ListOfOptionalBindingOrBindingWithInitializer)");
+    return raiseError("FIXME: Not implemented yet in this preview release (ListOfOptionalBindingOrBindingWithInitializer)");
 }
 
 template<typename Tok> JS::Result<ListNode*>
 BinASTParser<Tok>::parseListOfOptionalSpreadElementOrExpression()
 {
     uint32_t length;
     AutoList guard(*tokenizer_);
 
--- a/js/src/frontend/BinSource-auto.h
+++ b/js/src/frontend/BinSource-auto.h
@@ -191,27 +191,23 @@ JS::Result<ParseNode*> parseInterfaceArr
 JS::Result<ParseNode*> parseInterfaceArrowExpressionContentsWithExpression(const size_t start, const BinKind kind, const BinFields& fields);
 JS::Result<ParseNode*> parseInterfaceArrowExpressionContentsWithFunctionBody(const size_t start, const BinKind kind, const BinFields& fields);
 JS::Result<Ok> parseInterfaceAssertedBlockScope(const size_t start, const BinKind kind, const BinFields& fields);
 JS::Result<Ok> parseInterfaceAssertedBoundName(const size_t start, const BinKind kind, const BinFields& fields,
     AssertedScopeKind scopeKind);
 JS::Result<Ok> parseInterfaceAssertedBoundNamesScope(const size_t start, const BinKind kind, const BinFields& fields);
 JS::Result<Ok> parseInterfaceAssertedDeclaredName(const size_t start, const BinKind kind, const BinFields& fields,
     AssertedScopeKind scopeKind);
-JS::Result<Ok> parseInterfaceAssertedParameterName(const size_t start, const BinKind kind, const BinFields& fields,
-    AssertedScopeKind scopeKind,
-    MutableHandle<GCVector<JSAtom*>> positionalParams);
+JS::Result<ParseNode*> parseInterfaceAssertedParameterName(const size_t start, const BinKind kind, const BinFields& fields);
 JS::Result<Ok> parseInterfaceAssertedParameterScope(const size_t start, const BinKind kind, const BinFields& fields,
     MutableHandle<GCVector<JSAtom*>> positionalParams);
 JS::Result<Ok> parseInterfaceAssertedPositionalParameterName(const size_t start, const BinKind kind, const BinFields& fields,
     AssertedScopeKind scopeKind,
     MutableHandle<GCVector<JSAtom*>> positionalParams);
-JS::Result<Ok> parseInterfaceAssertedRestParameterName(const size_t start, const BinKind kind, const BinFields& fields,
-    AssertedScopeKind scopeKind,
-    MutableHandle<GCVector<JSAtom*>> positionalParams);
+JS::Result<ParseNode*> parseInterfaceAssertedRestParameterName(const size_t start, const BinKind kind, const BinFields& fields);
 JS::Result<Ok> parseInterfaceAssertedScriptGlobalScope(const size_t start, const BinKind kind, const BinFields& fields);
 JS::Result<Ok> parseInterfaceAssertedVarScope(const size_t start, const BinKind kind, const BinFields& fields);
 JS::Result<ParseNode*> parseInterfaceAssignmentExpression(const size_t start, const BinKind kind, const BinFields& fields);
 JS::Result<ParseNode*> parseInterfaceAssignmentTargetIdentifier(const size_t start, const BinKind kind, const BinFields& fields);
 JS::Result<ParseNode*> parseInterfaceAssignmentTargetPropertyIdentifier(const size_t start, const BinKind kind, const BinFields& fields);
 JS::Result<ParseNode*> parseInterfaceAssignmentTargetPropertyProperty(const size_t start, const BinKind kind, const BinFields& fields);
 JS::Result<ParseNode*> parseInterfaceAssignmentTargetWithInitializer(const size_t start, const BinKind kind, const BinFields& fields);
 JS::Result<ParseNode*> parseInterfaceAwaitExpression(const size_t start, const BinKind kind, const BinFields& fields);
--- a/js/src/frontend/BinSource.cpp
+++ b/js/src/frontend/BinSource.cpp
@@ -488,61 +488,70 @@ BinASTParser<Tok>::checkPositionalParame
     // `params` corresponds to `parseTree` in 3.1.9 CheckAssertedScope, and
     // `positionalParamNames` parameter
 
     // Steps 1-3.
     // PositionalParameterNames (3.1.9 CheckAssertedScope step 5.d) and
     // CreatePositionalParameterIndices (3.1.5 CheckPositionalParameterIndices
     // step 1) are done implicitly.
     uint32_t i = 0;
+    const bool hasRest = parseContext_->functionBox()->hasRest();
     for (ParseNode* param : params->contents()) {
         if (param->isKind(ParseNodeKind::Assign)) {
             param = param->as<AssignmentNode>().left();
         }
 
-        if (param->isKind(ParseNodeKind::Name)) {
+        // At this point, function body is not part of params list.
+        const bool isRest = hasRest && !param->pn_next;
+        if (isRest) {
+            // Rest parameter
+
+            // Step 3.
+            if (i >= positionalParams.get().length()) {
+                continue;
+            }
+
+            if (positionalParams.get()[i]) {
+                return raiseError("Expected positional parameter per AssertedParameterScope.paramNames, got rest parameter");
+            }
+        } else if (param->isKind(ParseNodeKind::Name)) {
             // Simple or default parameter.
 
             // Step 2.a.
             if (i >= positionalParams.get().length()) {
                 return raiseError("AssertedParameterScope.paramNames doesn't have corresponding entry to positional parameter");
             }
 
             JSAtom* name = positionalParams.get()[i];
             if (!name) {
                 // Step 2.a.ii.1.
-                return raiseError("AssertedParameterScope.paramNames asserted destructuring/rest parameter, got positional parameter");
+                return raiseError("Expected destructuring/rest parameter per AssertedParameterScope.paramNames, got positional parameter");
             }
 
             // Step 2.a.i.
             if (param->name() != name) {
                 // Step 2.a.ii.1.
-                return raiseError("AssertedPositionalParameterName: name mismatch");
+                return raiseError("Name mismatch between AssertedPositionalParameterName in AssertedParameterScope.paramNames and actual parameter");
             }
 
             // Step 2.a.i.1.
             // Implicitly done.
         } else {
-            // Destructuring or rest parameter.
+            // Destructuring parameter.
 
             MOZ_ASSERT(param->isKind(ParseNodeKind::Object) ||
-                       param->isKind(ParseNodeKind::Array) ||
-                       param->isKind(ParseNodeKind::Spread));
+                       param->isKind(ParseNodeKind::Array));
 
             // Step 3.
             if (i >= positionalParams.get().length()) {
                 continue;
             }
 
             if (positionalParams.get()[i]) {
-                if (param->isKind(ParseNodeKind::Spread)) {
-                    return raiseError("AssertedParameterScope.paramNames asserted positional parameter, got rest parameter");
-                } else {
-                    return raiseError("AssertedParameterScope.paramNames asserted positional parameter, got destructuring parameter");
-                }
+                return raiseError("Expected positional parameter per AssertedParameterScope.paramNames, got destructuring parameter");
             }
         }
 
         i++;
     }
 
     // Step 3.
     if (positionalParams.get().length() > params->count()) {
--- a/js/src/frontend/BinSource.yaml
+++ b/js/src/frontend/BinSource.yaml
@@ -266,16 +266,21 @@ AssertedDeclaredName:
 
 AssertedMaybePositionalParameterName:
     inherits: AssertedBoundName
     extra-params: |
         AssertedScopeKind scopeKind,
         MutableHandle<GCVector<JSAtom*>> positionalParams
     extra-args: |
         scopeKind, positionalParams
+    sum-arms:
+        AssertedRestParameterName:
+            disabled: true
+        AssertedParameterName:
+            disabled: true
 
 AssertedPositionalParameterName:
     inherits: AssertedMaybePositionalParameterName
     fields:
         name:
             after: |
                 // `positionalParams` vector can be shorter than the actual
                 // parameter length. Resize on demand.
@@ -294,22 +299,16 @@ AssertedPositionalParameterName:
                     }
                 }
 
                 if (positionalParams.get()[index]) {
                     return raiseError("AssertedPositionalParameterName has duplicate entry for the same index");
                 }
                 positionalParams.get()[index] = name;
 
-AssertedRestParameterName:
-    inherits: AssertedMaybePositionalParameterName
-
-AssertedParameterName:
-    inherits: AssertedMaybePositionalParameterName
-
 AssertedBoundNamesScope:
     inherits: AssertedBlockScope
     init: |
         const auto scopeKind = AssertedScopeKind::Catch;
     fields:
         boundNames:
             extra-args: scopeKind
 
@@ -845,18 +844,17 @@ ForInStatement:
         }
 
 FormalParameters:
     type-ok:
         ListNode*
     build: |
         auto result = items;
         if (rest) {
-            BINJS_TRY_DECL(spread, factory_.newSpread(start, rest));
-            factory_.addList(result, spread);
+            return raiseError("Rest parameter is not supported in this preview release");
         }
 
 ForStatement:
     init: |
         ParseContext::Statement stmt(parseContext_, StatementKind::ForLoop);
 
         // Implicit scope around the `for`, used to store `for (let x; ...; ...)`
         // or `for (const x; ...; ...)`-style declarations. Detail on the
--- a/js/src/frontend/binsource/src/main.rs
+++ b/js/src/frontend/binsource/src/main.rs
@@ -53,16 +53,19 @@ struct FieldRules {
 
     /// Extra arguments passed to the method when parsing this field.
     extra_args: Option<Rc<String>>,
 }
 
 #[derive(Clone, Default)]
 struct SumRules {
     after_arm: Option<String>,
+
+    // Disable this arm (false by default).
+    disabled: bool,
 }
 
 
 /// Rules for generating the code for parsing a full node
 /// of a node.
 ///
 /// Extracted from the yaml file.
 #[derive(Clone, Default)]
@@ -350,16 +353,25 @@ impl GlobalRules {
                                 let arm_config_key = arm_config_key.as_str()
                                     .expect("Expected a string as a key");
                                 match arm_config_key
                                 {
                                     "after" => {
                                         update_rule(&mut sum_rule.after_arm, arm_config_entry)
                                             .unwrap_or_else(|()| panic!("Rule {}.sum-arms.{}.{} must be a string", node_key, sum_arm_key, arm_config_key));
                                     }
+                                    "disabled" => {
+                                        if let Some(disabled) = arm_config_entry.as_bool() {
+                                            if disabled {
+                                                sum_rule.disabled = true;
+                                            }
+                                        } else {
+                                            panic!("Rule {}.sum-arms.{}.{} must be a bool", node_key, sum_arm_key, arm_config_key);
+                                        }
+                                    }
                                     _ => {
                                         panic!("Unexpected {}.sum-arms.{}.{}", node_key, sum_arm_key, arm_config_key);
                                     }
                                 }
                             }
                             node_rule.by_sum.insert(sum_arm_name.clone(), sum_rule);
                         }
                     }
@@ -1175,29 +1187,39 @@ impl CPPExporter {
         let inner_prefix = "Sum";
         if !self.refgraph.is_used(Rc::new(format!("{}{}", inner_prefix, name))) {
             return;
         }
 
         // Generate inner method
         let mut buffer_cases = String::new();
         for node in nodes {
+            let rule_for_this_arm = rules_for_this_sum.by_sum.get(&node)
+                .cloned()
+                .unwrap_or_default();
+
+            if rule_for_this_arm.disabled {
+                buffer_cases.push_str(&format!("
+      case BinKind::{variant_name}:
+        return raiseError(\"FIXME: Not implemented yet in this preview release ({variant_name})\");",
+                    variant_name = node.to_cpp_enum_case()));
+                continue;
+            }
+
             buffer_cases.push_str(&format!("
       case BinKind::{variant_name}:
 {call}
 {arm_after}        break;",
                 call = self.get_method_call("result", node,
                                             "Interface", INTERFACE_ARGS,
                                             &extra_args,
                                             MethodCallKind::AlwaysVar)
                     .reindent("        "),
                 variant_name = node.to_cpp_enum_case(),
-                arm_after = rules_for_this_sum.by_sum.get(&node)
-                    .cloned()
-                    .unwrap_or_default().after_arm.reindent("        ")
+                arm_after = rule_for_this_arm.after_arm.reindent("        ")
                     .newline_if_not_empty()));
         }
         buffer.push_str(&format!("\n{first_line}
 {{
     {type_ok} result;
     switch (kind) {{{cases}
       default:
         return raiseInvalidKind(\"{kind}\", kind);
@@ -1243,17 +1265,17 @@ impl CPPExporter {
 
         let init = match rules_for_this_list.init {
             Some(str) => str.reindent("    "),
             None => {
                 // We cannot generate the method if we don't know how to initialize the list.
                 let rendered = format!("
 {first_line}
 {{
-    return raiseError(\"FIXME: Not implemented yet ({kind})\");
+    return raiseError(\"FIXME: Not implemented yet in this preview release ({kind})\");
 }}\n",
                     first_line = first_line,
                     kind = kind,
                 );
                 buffer.push_str(&rendered);
                 return;
             }
         };
@@ -1453,17 +1475,17 @@ impl CPPExporter {
                     }
                     &TypeSpec::String => {
                         let build_result = rules_for_this_node.init.reindent("    ");
                         let first_line = self.get_method_definition_start(&parser.name, "", "",
                                                                           &extra_params);
                         if build_result.len() == 0 {
                             buffer.push_str(&format!("{first_line}
 {{
-    return raiseError(\"FIXME: Not implemented yet ({kind})\");
+    return raiseError(\"FIXME: Not implemented yet in this preview release ({kind})\");
 }}
 
 ",
                                 first_line = first_line,
                                 kind = parser.name.to_str()));
                         } else {
                             buffer.push_str(&format!("{first_line}
 {{
@@ -1482,17 +1504,17 @@ impl CPPExporter {
                     }
                     &TypeSpec::IdentifierName => {
                         let build_result = rules_for_this_node.init.reindent("    ");
                         let first_line = self.get_method_definition_start(&parser.name, "", "",
                                                                           &extra_params);
                         if build_result.len() == 0 {
                             buffer.push_str(&format!("{first_line}
 {{
-    return raiseError(\"FIXME: Not implemented yet ({kind})\");
+    return raiseError(\"FIXME: Not implemented yet in this preview release ({kind})\");
 }}
 
 ",
                                 first_line = first_line,
                                 kind = parser.name.to_str()));
                         } else {
                             buffer.push_str(&format!("{first_line}
 {{
@@ -1512,17 +1534,17 @@ impl CPPExporter {
                     &TypeSpec::PropertyKey => {
                         debug!(target: "generate_spidermonkey", "Generating method for PropertyKey: {:?}", parser.name);
                         let build_result = rules_for_this_node.init.reindent("    ");
                         let first_line = self.get_method_definition_start(&parser.name, "", "",
                                                                           &extra_params);
                         if build_result.len() == 0 {
                             buffer.push_str(&format!("{first_line}
 {{
-    return raiseError(\"FIXME: Not implemented yet ({kind})\");
+    return raiseError(\"FIXME: Not implemented yet in this preview release ({kind})\");
 }}
 
 ",
                                 first_line = first_line,
                                 kind = parser.name.to_str()));
                         } else {
                             buffer.push_str(&format!("{first_line}
 {{
@@ -1758,17 +1780,17 @@ impl CPPExporter {
         }
 
         let init = rules_for_this_interface.init.reindent("    ");
         let build_result = rules_for_this_interface.build_result.reindent("    ");
 
         if build_result == "" {
             buffer.push_str(&format!("{first_line}
 {{
-    return raiseError(\"FIXME: Not implemented yet ({class_name})\");
+    return raiseError(\"FIXME: Not implemented yet in this preview release ({class_name})\");
 }}
 
 ",
                 class_name = name.to_class_cases(),
                 first_line = first_line,
             ));
         } else {
             let check_fields = if number_of_fields == 0 {