Backed out 3 changesets (bug 1505343) for build bustages in testBinASTReader.cpp CLOSED TREE
authorNoemi Erli <nerli@mozilla.com>
Wed, 13 Mar 2019 05:26:34 +0200
changeset 521651 7cbe3fbc4b7f1c76a14ce40f074f8a9052540ee5
parent 521650 53ab271d602016d35cce17633ac0fe646230a470
child 521652 a0767cb93359a8c1595d7fba55fa51de3d7f65ed
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1505343
milestone67.0a1
backs out4ac13d1f0d7c331ca5e0a27bcf2ef73fd7bf8ed8
b2456f6d11c4f3a9e02f601e16a3c8b80ae4aaa5
c1e2b7779d6a13626b13bbb1916f8819756a19ff
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
Backed out 3 changesets (bug 1505343) for build bustages in testBinASTReader.cpp CLOSED TREE Backed out changeset 4ac13d1f0d7c (bug 1505343) Backed out changeset b2456f6d11c4 (bug 1505343) Backed out changeset c1e2b7779d6a (bug 1505343)
Cargo.toml
js/src/frontend/BinAST-macros.h
js/src/frontend/BinAST.webidl_
js/src/frontend/BinAST.yaml
js/src/frontend/BinASTEnum.h
js/src/frontend/BinASTParser.cpp
js/src/frontend/BinASTParser.h
js/src/frontend/BinASTParserPerTokenizer.cpp
js/src/frontend/BinASTParserPerTokenizer.h
js/src/frontend/BinASTRuntimeSupport.cpp
js/src/frontend/BinASTRuntimeSupport.h
js/src/frontend/BinASTToken.cpp
js/src/frontend/BinASTToken.h
js/src/frontend/BinASTTokenReaderBase.cpp
js/src/frontend/BinASTTokenReaderBase.h
js/src/frontend/BinASTTokenReaderMultipart.cpp
js/src/frontend/BinASTTokenReaderMultipart.h
js/src/frontend/BinSource-macros.h
js/src/frontend/BinSource.webidl_
js/src/frontend/BinSource.yaml
js/src/frontend/BinSourceRuntimeSupport.cpp
js/src/frontend/BinSourceRuntimeSupport.h
js/src/frontend/BinToken.cpp
js/src/frontend/BinToken.h
js/src/frontend/BinTokenReaderBase.cpp
js/src/frontend/BinTokenReaderBase.h
js/src/frontend/BinTokenReaderMultipart.cpp
js/src/frontend/BinTokenReaderMultipart.h
js/src/frontend/BytecodeCompiler.cpp
js/src/frontend/BytecodeCompiler.h
js/src/frontend/binast/Cargo.toml
js/src/frontend/binast/README.md
js/src/frontend/binast/build.sh
js/src/frontend/binast/moz.build
js/src/frontend/binast/src/main.rs
js/src/frontend/binast/src/refgraph.rs
js/src/frontend/binsource/Cargo.toml
js/src/frontend/binsource/README.md
js/src/frontend/binsource/build.sh
js/src/frontend/binsource/moz.build
js/src/frontend/binsource/src/main.rs
js/src/frontend/binsource/src/refgraph.rs
js/src/frontend/moz.build
js/src/jsapi-tests/testBinASTReader.cpp
js/src/shell/js.cpp
js/src/vm/JSScript.cpp
js/src/vm/JSScript.h
js/src/vm/Runtime.h
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -4,17 +4,17 @@
 # Their transitive dependencies and dev-dependencies are included automatically
 # and do not need to be listed here. Their external dependencies are vendored
 # into `third_party/rust` by `mach vendor rust`.
 members = [
   "js/src",
   "js/src/rust",
   "js/src/wasm/cranelift",
   "js/rust",
-  "js/src/frontend/binast", # Code generator.
+  "js/src/frontend/binsource", # Code generator.
   "testing/geckodriver",
   "toolkit/crashreporter/rust",
   "toolkit/library/gtest/rust",
   "toolkit/library/rust/",
 ]
 
 # Excluded crates may be built as dependencies, but won't be considered members
 # of the workspace and their dev-dependencies won't be included.
--- a/js/src/frontend/BinASTEnum.h
+++ b/js/src/frontend/BinASTEnum.h
@@ -2,17 +2,17 @@
 // please DO NOT EDIT BY HAND.
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // To generate this file, see the documentation in
-// js/src/frontend/binast/README.md.
+// js/src/frontend/binsource/README.md.
 
 #ifndef frontend_BinASTEnum_h
 #define frontend_BinASTEnum_h
 
 namespace js {
 namespace frontend {
 namespace binast {
 
--- a/js/src/frontend/BinASTParser.cpp
+++ b/js/src/frontend/BinASTParser.cpp
@@ -2,29 +2,29 @@
 // please DO NOT EDIT BY HAND.
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // To generate this file, see the documentation in
-// js/src/frontend/binast/README.md.
+// js/src/frontend/binsource/README.md.
 
 #include "frontend/BinASTParser.h"
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Casting.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/Move.h"
 #include "mozilla/PodOperations.h"
 #include "mozilla/Vector.h"
 
-#include "frontend/BinAST-macros.h"
-#include "frontend/BinASTTokenReaderMultipart.h"
+#include "frontend/BinSource-macros.h"
+#include "frontend/BinTokenReaderMultipart.h"
 #include "frontend/FullParseHandler.h"
 #include "frontend/ParseNode.h"
 #include "frontend/Parser.h"
 #include "frontend/SharedContext.h"
 
 #include "vm/RegExpObject.h"
 
 #include "frontend/ParseContext-inl.h"
@@ -45,48 +45,48 @@ bool operator==(const typename Tok::Char
 AssertedMaybePositionalParameterName ::= AssertedParameterName
     AssertedPositionalParameterName
     AssertedRestParameterName
 */
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseAssertedMaybePositionalParameterName(
     AssertedScopeKind scopeKind,
     MutableHandle<GCVector<JSAtom*>> positionalParams) {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
   const auto start = tokenizer_->offset();
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
 
   BINJS_MOZ_TRY_DECL(result,
                      parseSumAssertedMaybePositionalParameterName(
                          start, kind, fields, scopeKind, positionalParams));
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseSumAssertedMaybePositionalParameterName(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields,
+    const size_t start, const BinKind kind, const BinFields& fields,
     AssertedScopeKind scopeKind,
     MutableHandle<GCVector<JSAtom*>> positionalParams) {
   Ok result;
   switch (kind) {
-    case BinASTKind::AssertedParameterName:
+    case BinKind::AssertedParameterName:
       return raiseError(
           "FIXME: Not implemented yet in this preview release "
           "(AssertedParameterName)");
-    case BinASTKind::AssertedPositionalParameterName:
+    case BinKind::AssertedPositionalParameterName:
       MOZ_TRY_VAR(result,
                   parseInterfaceAssertedPositionalParameterName(
                       start, kind, fields, scopeKind, positionalParams));
       break;
-    case BinASTKind::AssertedRestParameterName:
+    case BinKind::AssertedRestParameterName:
       return raiseError(
           "FIXME: Not implemented yet in this preview release "
           "(AssertedRestParameterName)");
     default:
       return raiseInvalidKind("AssertedMaybePositionalParameterName", kind);
   }
   return result;
 }
@@ -95,92 +95,92 @@ JS::Result<Ok> BinASTParser<Tok>::parseS
 AssignmentTarget ::= ArrayAssignmentTarget
     AssignmentTargetIdentifier
     ComputedMemberAssignmentTarget
     ObjectAssignmentTarget
     StaticMemberAssignmentTarget
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseAssignmentTarget() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
   const auto start = tokenizer_->offset();
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
 
   BINJS_MOZ_TRY_DECL(result, parseSumAssignmentTarget(start, kind, fields));
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseSumAssignmentTarget(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   ParseNode* result;
   switch (kind) {
-    case BinASTKind::ArrayAssignmentTarget:
+    case BinKind::ArrayAssignmentTarget:
       MOZ_TRY_VAR(result,
                   parseInterfaceArrayAssignmentTarget(start, kind, fields));
       break;
-    case BinASTKind::AssignmentTargetIdentifier:
+    case BinKind::AssignmentTargetIdentifier:
       MOZ_TRY_VAR(result, parseInterfaceAssignmentTargetIdentifier(start, kind,
                                                                    fields));
       break;
-    case BinASTKind::ComputedMemberAssignmentTarget:
+    case BinKind::ComputedMemberAssignmentTarget:
       MOZ_TRY_VAR(result, parseInterfaceComputedMemberAssignmentTarget(
                               start, kind, fields));
       break;
-    case BinASTKind::ObjectAssignmentTarget:
+    case BinKind::ObjectAssignmentTarget:
       MOZ_TRY_VAR(result,
                   parseInterfaceObjectAssignmentTarget(start, kind, fields));
       break;
-    case BinASTKind::StaticMemberAssignmentTarget:
+    case BinKind::StaticMemberAssignmentTarget:
       MOZ_TRY_VAR(result, parseInterfaceStaticMemberAssignmentTarget(
                               start, kind, fields));
       break;
     default:
       return raiseInvalidKind("AssignmentTarget", kind);
   }
   return result;
 }
 
 /*
 Binding ::= ArrayBinding
     BindingIdentifier
     ObjectBinding
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseBinding() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
   const auto start = tokenizer_->offset();
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
 
   BINJS_MOZ_TRY_DECL(result, parseSumBinding(start, kind, fields));
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseSumBinding(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   ParseNode* result;
   switch (kind) {
-    case BinASTKind::ArrayBinding:
+    case BinKind::ArrayBinding:
       MOZ_TRY_VAR(result, parseInterfaceArrayBinding(start, kind, fields));
       break;
-    case BinASTKind::BindingIdentifier:
+    case BinKind::BindingIdentifier:
       MOZ_TRY_VAR(result, parseInterfaceBindingIdentifier(start, kind, fields));
       break;
-    case BinASTKind::ObjectBinding:
+    case BinKind::ObjectBinding:
       MOZ_TRY_VAR(result, parseInterfaceObjectBinding(start, kind, fields));
       break;
     default:
       return raiseInvalidKind("Binding", kind);
   }
   return result;
 }
 
@@ -215,148 +215,148 @@ Expression ::= ArrayExpression
     ThisExpression
     UnaryExpression
     UpdateExpression
     YieldExpression
     YieldStarExpression
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseExpression() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
   const auto start = tokenizer_->offset();
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
 
   BINJS_MOZ_TRY_DECL(result, parseSumExpression(start, kind, fields));
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseSumExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   ParseNode* result;
   switch (kind) {
-    case BinASTKind::ArrayExpression:
+    case BinKind::ArrayExpression:
       MOZ_TRY_VAR(result, parseInterfaceArrayExpression(start, kind, fields));
       break;
-    case BinASTKind::AssignmentExpression:
+    case BinKind::AssignmentExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceAssignmentExpression(start, kind, fields));
       break;
-    case BinASTKind::AwaitExpression:
+    case BinKind::AwaitExpression:
       MOZ_TRY_VAR(result, parseInterfaceAwaitExpression(start, kind, fields));
       break;
-    case BinASTKind::BinaryExpression:
+    case BinKind::BinaryExpression:
       MOZ_TRY_VAR(result, parseInterfaceBinaryExpression(start, kind, fields));
       break;
-    case BinASTKind::CallExpression:
+    case BinKind::CallExpression:
       MOZ_TRY_VAR(result, parseInterfaceCallExpression(start, kind, fields));
       break;
-    case BinASTKind::ClassExpression:
+    case BinKind::ClassExpression:
       MOZ_TRY_VAR(result, parseInterfaceClassExpression(start, kind, fields));
       break;
-    case BinASTKind::CompoundAssignmentExpression:
+    case BinKind::CompoundAssignmentExpression:
       MOZ_TRY_VAR(result, parseInterfaceCompoundAssignmentExpression(
                               start, kind, fields));
       break;
-    case BinASTKind::ComputedMemberExpression:
+    case BinKind::ComputedMemberExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceComputedMemberExpression(start, kind, fields));
       break;
-    case BinASTKind::ConditionalExpression:
+    case BinKind::ConditionalExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceConditionalExpression(start, kind, fields));
       break;
-    case BinASTKind::EagerArrowExpressionWithExpression:
+    case BinKind::EagerArrowExpressionWithExpression:
       MOZ_TRY_VAR(result, parseInterfaceEagerArrowExpressionWithExpression(
                               start, kind, fields));
       break;
-    case BinASTKind::EagerArrowExpressionWithFunctionBody:
+    case BinKind::EagerArrowExpressionWithFunctionBody:
       MOZ_TRY_VAR(result, parseInterfaceEagerArrowExpressionWithFunctionBody(
                               start, kind, fields));
       break;
-    case BinASTKind::EagerFunctionExpression:
+    case BinKind::EagerFunctionExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceEagerFunctionExpression(start, kind, fields));
       break;
-    case BinASTKind::IdentifierExpression:
+    case BinKind::IdentifierExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceIdentifierExpression(start, kind, fields));
       break;
-    case BinASTKind::LazyArrowExpressionWithExpression:
+    case BinKind::LazyArrowExpressionWithExpression:
       MOZ_TRY_VAR(result, parseInterfaceLazyArrowExpressionWithExpression(
                               start, kind, fields));
       break;
-    case BinASTKind::LazyArrowExpressionWithFunctionBody:
+    case BinKind::LazyArrowExpressionWithFunctionBody:
       MOZ_TRY_VAR(result, parseInterfaceLazyArrowExpressionWithFunctionBody(
                               start, kind, fields));
       break;
-    case BinASTKind::LazyFunctionExpression:
+    case BinKind::LazyFunctionExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLazyFunctionExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralBooleanExpression:
+    case BinKind::LiteralBooleanExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralBooleanExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralInfinityExpression:
+    case BinKind::LiteralInfinityExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralInfinityExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralNullExpression:
+    case BinKind::LiteralNullExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralNullExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralNumericExpression:
+    case BinKind::LiteralNumericExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralNumericExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralRegExpExpression:
+    case BinKind::LiteralRegExpExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralRegExpExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralStringExpression:
+    case BinKind::LiteralStringExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralStringExpression(start, kind, fields));
       break;
-    case BinASTKind::NewExpression:
+    case BinKind::NewExpression:
       MOZ_TRY_VAR(result, parseInterfaceNewExpression(start, kind, fields));
       break;
-    case BinASTKind::NewTargetExpression:
+    case BinKind::NewTargetExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceNewTargetExpression(start, kind, fields));
       break;
-    case BinASTKind::ObjectExpression:
+    case BinKind::ObjectExpression:
       MOZ_TRY_VAR(result, parseInterfaceObjectExpression(start, kind, fields));
       break;
-    case BinASTKind::StaticMemberExpression:
+    case BinKind::StaticMemberExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceStaticMemberExpression(start, kind, fields));
       break;
-    case BinASTKind::TemplateExpression:
+    case BinKind::TemplateExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceTemplateExpression(start, kind, fields));
       break;
-    case BinASTKind::ThisExpression:
+    case BinKind::ThisExpression:
       MOZ_TRY_VAR(result, parseInterfaceThisExpression(start, kind, fields));
       break;
-    case BinASTKind::UnaryExpression:
+    case BinKind::UnaryExpression:
       MOZ_TRY_VAR(result, parseInterfaceUnaryExpression(start, kind, fields));
       break;
-    case BinASTKind::UpdateExpression:
+    case BinKind::UpdateExpression:
       MOZ_TRY_VAR(result, parseInterfaceUpdateExpression(start, kind, fields));
       break;
-    case BinASTKind::YieldExpression:
+    case BinKind::YieldExpression:
       MOZ_TRY_VAR(result, parseInterfaceYieldExpression(start, kind, fields));
       break;
-    case BinASTKind::YieldStarExpression:
+    case BinKind::YieldStarExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceYieldStarExpression(start, kind, fields));
       break;
     default:
       return raiseInvalidKind("Expression", kind);
   }
   return result;
 }
@@ -393,151 +393,151 @@ ExpressionOrSuper ::= ArrayExpression
     ThisExpression
     UnaryExpression
     UpdateExpression
     YieldExpression
     YieldStarExpression
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseExpressionOrSuper() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
   const auto start = tokenizer_->offset();
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
 
   BINJS_MOZ_TRY_DECL(result, parseSumExpressionOrSuper(start, kind, fields));
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseSumExpressionOrSuper(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   ParseNode* result;
   switch (kind) {
-    case BinASTKind::ArrayExpression:
+    case BinKind::ArrayExpression:
       MOZ_TRY_VAR(result, parseInterfaceArrayExpression(start, kind, fields));
       break;
-    case BinASTKind::AssignmentExpression:
+    case BinKind::AssignmentExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceAssignmentExpression(start, kind, fields));
       break;
-    case BinASTKind::AwaitExpression:
+    case BinKind::AwaitExpression:
       MOZ_TRY_VAR(result, parseInterfaceAwaitExpression(start, kind, fields));
       break;
-    case BinASTKind::BinaryExpression:
+    case BinKind::BinaryExpression:
       MOZ_TRY_VAR(result, parseInterfaceBinaryExpression(start, kind, fields));
       break;
-    case BinASTKind::CallExpression:
+    case BinKind::CallExpression:
       MOZ_TRY_VAR(result, parseInterfaceCallExpression(start, kind, fields));
       break;
-    case BinASTKind::ClassExpression:
+    case BinKind::ClassExpression:
       MOZ_TRY_VAR(result, parseInterfaceClassExpression(start, kind, fields));
       break;
-    case BinASTKind::CompoundAssignmentExpression:
+    case BinKind::CompoundAssignmentExpression:
       MOZ_TRY_VAR(result, parseInterfaceCompoundAssignmentExpression(
                               start, kind, fields));
       break;
-    case BinASTKind::ComputedMemberExpression:
+    case BinKind::ComputedMemberExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceComputedMemberExpression(start, kind, fields));
       break;
-    case BinASTKind::ConditionalExpression:
+    case BinKind::ConditionalExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceConditionalExpression(start, kind, fields));
       break;
-    case BinASTKind::EagerArrowExpressionWithExpression:
+    case BinKind::EagerArrowExpressionWithExpression:
       MOZ_TRY_VAR(result, parseInterfaceEagerArrowExpressionWithExpression(
                               start, kind, fields));
       break;
-    case BinASTKind::EagerArrowExpressionWithFunctionBody:
+    case BinKind::EagerArrowExpressionWithFunctionBody:
       MOZ_TRY_VAR(result, parseInterfaceEagerArrowExpressionWithFunctionBody(
                               start, kind, fields));
       break;
-    case BinASTKind::EagerFunctionExpression:
+    case BinKind::EagerFunctionExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceEagerFunctionExpression(start, kind, fields));
       break;
-    case BinASTKind::IdentifierExpression:
+    case BinKind::IdentifierExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceIdentifierExpression(start, kind, fields));
       break;
-    case BinASTKind::LazyArrowExpressionWithExpression:
+    case BinKind::LazyArrowExpressionWithExpression:
       MOZ_TRY_VAR(result, parseInterfaceLazyArrowExpressionWithExpression(
                               start, kind, fields));
       break;
-    case BinASTKind::LazyArrowExpressionWithFunctionBody:
+    case BinKind::LazyArrowExpressionWithFunctionBody:
       MOZ_TRY_VAR(result, parseInterfaceLazyArrowExpressionWithFunctionBody(
                               start, kind, fields));
       break;
-    case BinASTKind::LazyFunctionExpression:
+    case BinKind::LazyFunctionExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLazyFunctionExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralBooleanExpression:
+    case BinKind::LiteralBooleanExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralBooleanExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralInfinityExpression:
+    case BinKind::LiteralInfinityExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralInfinityExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralNullExpression:
+    case BinKind::LiteralNullExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralNullExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralNumericExpression:
+    case BinKind::LiteralNumericExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralNumericExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralRegExpExpression:
+    case BinKind::LiteralRegExpExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralRegExpExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralStringExpression:
+    case BinKind::LiteralStringExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralStringExpression(start, kind, fields));
       break;
-    case BinASTKind::NewExpression:
+    case BinKind::NewExpression:
       MOZ_TRY_VAR(result, parseInterfaceNewExpression(start, kind, fields));
       break;
-    case BinASTKind::NewTargetExpression:
+    case BinKind::NewTargetExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceNewTargetExpression(start, kind, fields));
       break;
-    case BinASTKind::ObjectExpression:
+    case BinKind::ObjectExpression:
       MOZ_TRY_VAR(result, parseInterfaceObjectExpression(start, kind, fields));
       break;
-    case BinASTKind::StaticMemberExpression:
+    case BinKind::StaticMemberExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceStaticMemberExpression(start, kind, fields));
       break;
-    case BinASTKind::Super:
+    case BinKind::Super:
       MOZ_TRY_VAR(result, parseInterfaceSuper(start, kind, fields));
       break;
-    case BinASTKind::TemplateExpression:
+    case BinKind::TemplateExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceTemplateExpression(start, kind, fields));
       break;
-    case BinASTKind::ThisExpression:
+    case BinKind::ThisExpression:
       MOZ_TRY_VAR(result, parseInterfaceThisExpression(start, kind, fields));
       break;
-    case BinASTKind::UnaryExpression:
+    case BinKind::UnaryExpression:
       MOZ_TRY_VAR(result, parseInterfaceUnaryExpression(start, kind, fields));
       break;
-    case BinASTKind::UpdateExpression:
+    case BinKind::UpdateExpression:
       MOZ_TRY_VAR(result, parseInterfaceUpdateExpression(start, kind, fields));
       break;
-    case BinASTKind::YieldExpression:
+    case BinKind::YieldExpression:
       MOZ_TRY_VAR(result, parseInterfaceYieldExpression(start, kind, fields));
       break;
-    case BinASTKind::YieldStarExpression:
+    case BinKind::YieldStarExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceYieldStarExpression(start, kind, fields));
       break;
     default:
       return raiseInvalidKind("ExpressionOrSuper", kind);
   }
   return result;
 }
@@ -548,56 +548,56 @@ ForInOfBindingOrAssignmentTarget ::= Arr
     ComputedMemberAssignmentTarget
     ForInOfBinding
     ObjectAssignmentTarget
     StaticMemberAssignmentTarget
 */
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseForInOfBindingOrAssignmentTarget() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
   const auto start = tokenizer_->offset();
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
 
   BINJS_MOZ_TRY_DECL(
       result, parseSumForInOfBindingOrAssignmentTarget(start, kind, fields));
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseSumForInOfBindingOrAssignmentTarget(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   ParseNode* result;
   switch (kind) {
-    case BinASTKind::ArrayAssignmentTarget:
+    case BinKind::ArrayAssignmentTarget:
       MOZ_TRY_VAR(result,
                   parseInterfaceArrayAssignmentTarget(start, kind, fields));
       break;
-    case BinASTKind::AssignmentTargetIdentifier:
+    case BinKind::AssignmentTargetIdentifier:
       MOZ_TRY_VAR(result, parseInterfaceAssignmentTargetIdentifier(start, kind,
                                                                    fields));
       break;
-    case BinASTKind::ComputedMemberAssignmentTarget:
+    case BinKind::ComputedMemberAssignmentTarget:
       MOZ_TRY_VAR(result, parseInterfaceComputedMemberAssignmentTarget(
                               start, kind, fields));
       break;
-    case BinASTKind::ForInOfBinding:
+    case BinKind::ForInOfBinding:
       MOZ_TRY_VAR(result, parseInterfaceForInOfBinding(start, kind, fields));
       break;
-    case BinASTKind::ObjectAssignmentTarget:
+    case BinKind::ObjectAssignmentTarget:
       MOZ_TRY_VAR(result,
                   parseInterfaceObjectAssignmentTarget(start, kind, fields));
       break;
-    case BinASTKind::StaticMemberAssignmentTarget:
+    case BinKind::StaticMemberAssignmentTarget:
       MOZ_TRY_VAR(result, parseInterfaceStaticMemberAssignmentTarget(
                               start, kind, fields));
       break;
     default:
       return raiseInvalidKind("ForInOfBindingOrAssignmentTarget", kind);
   }
   return result;
 }
@@ -609,225 +609,225 @@ ObjectProperty ::= DataProperty
     EagerSetter
     LazyGetter
     LazyMethod
     LazySetter
     ShorthandProperty
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseObjectProperty() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
   const auto start = tokenizer_->offset();
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
 
   BINJS_MOZ_TRY_DECL(result, parseSumObjectProperty(start, kind, fields));
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseSumObjectProperty(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   ParseNode* result;
   switch (kind) {
-    case BinASTKind::DataProperty:
+    case BinKind::DataProperty:
       MOZ_TRY_VAR(result, parseInterfaceDataProperty(start, kind, fields));
       break;
-    case BinASTKind::EagerGetter:
+    case BinKind::EagerGetter:
       MOZ_TRY_VAR(result, parseInterfaceEagerGetter(start, kind, fields));
       break;
-    case BinASTKind::EagerMethod:
+    case BinKind::EagerMethod:
       MOZ_TRY_VAR(result, parseInterfaceEagerMethod(start, kind, fields));
       break;
-    case BinASTKind::EagerSetter:
+    case BinKind::EagerSetter:
       MOZ_TRY_VAR(result, parseInterfaceEagerSetter(start, kind, fields));
       break;
-    case BinASTKind::LazyGetter:
+    case BinKind::LazyGetter:
       MOZ_TRY_VAR(result, parseInterfaceLazyGetter(start, kind, fields));
       break;
-    case BinASTKind::LazyMethod:
+    case BinKind::LazyMethod:
       MOZ_TRY_VAR(result, parseInterfaceLazyMethod(start, kind, fields));
       break;
-    case BinASTKind::LazySetter:
+    case BinKind::LazySetter:
       MOZ_TRY_VAR(result, parseInterfaceLazySetter(start, kind, fields));
       break;
-    case BinASTKind::ShorthandProperty:
+    case BinKind::ShorthandProperty:
       MOZ_TRY_VAR(result, parseInterfaceShorthandProperty(start, kind, fields));
       break;
     default:
       return raiseInvalidKind("ObjectProperty", kind);
   }
   return result;
 }
 
 /*
 Parameter ::= ArrayBinding
     BindingIdentifier
     BindingWithInitializer
     ObjectBinding
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseParameter() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
   const auto start = tokenizer_->offset();
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
 
   BINJS_MOZ_TRY_DECL(result, parseSumParameter(start, kind, fields));
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseSumParameter(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   ParseNode* result;
   switch (kind) {
-    case BinASTKind::ArrayBinding:
+    case BinKind::ArrayBinding:
       MOZ_TRY_VAR(result, parseInterfaceArrayBinding(start, kind, fields));
       break;
-    case BinASTKind::BindingIdentifier:
+    case BinKind::BindingIdentifier:
       MOZ_TRY_VAR(result, parseInterfaceBindingIdentifier(start, kind, fields));
       if (!pc_->positionalFormalParameterNames().append(
               result->template as<NameNode>().atom())) {
         return raiseOOM();
       }
       if (pc_->isFunctionBox()) {
         pc_->functionBox()->length++;
       }
       break;
-    case BinASTKind::BindingWithInitializer:
+    case BinKind::BindingWithInitializer:
       MOZ_TRY_VAR(result,
                   parseInterfaceBindingWithInitializer(start, kind, fields));
       break;
-    case BinASTKind::ObjectBinding:
+    case BinKind::ObjectBinding:
       MOZ_TRY_VAR(result, parseInterfaceObjectBinding(start, kind, fields));
       break;
     default:
       return raiseInvalidKind("Parameter", kind);
   }
   return result;
 }
 
 /*
 Program ::= Module
     Script
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseProgram() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
   const auto start = tokenizer_->offset();
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
 
   BINJS_MOZ_TRY_DECL(result, parseSumProgram(start, kind, fields));
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseSumProgram(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   ParseNode* result;
   switch (kind) {
-    case BinASTKind::Module:
+    case BinKind::Module:
       MOZ_TRY_VAR(result, parseInterfaceModule(start, kind, fields));
       break;
-    case BinASTKind::Script:
+    case BinKind::Script:
       MOZ_TRY_VAR(result, parseInterfaceScript(start, kind, fields));
       break;
     default:
       return raiseInvalidKind("Program", kind);
   }
   return result;
 }
 
 /*
 PropertyName ::= ComputedPropertyName
     LiteralPropertyName
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parsePropertyName() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
   const auto start = tokenizer_->offset();
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
 
   BINJS_MOZ_TRY_DECL(result, parseSumPropertyName(start, kind, fields));
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseSumPropertyName(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   ParseNode* result;
   switch (kind) {
-    case BinASTKind::ComputedPropertyName:
+    case BinKind::ComputedPropertyName:
       MOZ_TRY_VAR(result,
                   parseInterfaceComputedPropertyName(start, kind, fields));
       break;
-    case BinASTKind::LiteralPropertyName:
+    case BinKind::LiteralPropertyName:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralPropertyName(start, kind, fields));
       break;
     default:
       return raiseInvalidKind("PropertyName", kind);
   }
   return result;
 }
 
 /*
 SimpleAssignmentTarget ::= AssignmentTargetIdentifier
     ComputedMemberAssignmentTarget
     StaticMemberAssignmentTarget
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseSimpleAssignmentTarget() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
   const auto start = tokenizer_->offset();
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
 
   BINJS_MOZ_TRY_DECL(result,
                      parseSumSimpleAssignmentTarget(start, kind, fields));
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseSumSimpleAssignmentTarget(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   ParseNode* result;
   switch (kind) {
-    case BinASTKind::AssignmentTargetIdentifier:
+    case BinKind::AssignmentTargetIdentifier:
       MOZ_TRY_VAR(result, parseInterfaceAssignmentTargetIdentifier(start, kind,
                                                                    fields));
       break;
-    case BinASTKind::ComputedMemberAssignmentTarget:
+    case BinKind::ComputedMemberAssignmentTarget:
       MOZ_TRY_VAR(result, parseInterfaceComputedMemberAssignmentTarget(
                               start, kind, fields));
       break;
-    case BinASTKind::StaticMemberAssignmentTarget:
+    case BinKind::StaticMemberAssignmentTarget:
       MOZ_TRY_VAR(result, parseInterfaceStaticMemberAssignmentTarget(
                               start, kind, fields));
       break;
     default:
       return raiseInvalidKind("SimpleAssignmentTarget", kind);
   }
   return result;
 }
@@ -864,152 +864,152 @@ SpreadElementOrExpression ::= ArrayExpre
     ThisExpression
     UnaryExpression
     UpdateExpression
     YieldExpression
     YieldStarExpression
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseSpreadElementOrExpression() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
   const auto start = tokenizer_->offset();
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
 
   BINJS_MOZ_TRY_DECL(result,
                      parseSumSpreadElementOrExpression(start, kind, fields));
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseSumSpreadElementOrExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   ParseNode* result;
   switch (kind) {
-    case BinASTKind::ArrayExpression:
+    case BinKind::ArrayExpression:
       MOZ_TRY_VAR(result, parseInterfaceArrayExpression(start, kind, fields));
       break;
-    case BinASTKind::AssignmentExpression:
+    case BinKind::AssignmentExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceAssignmentExpression(start, kind, fields));
       break;
-    case BinASTKind::AwaitExpression:
+    case BinKind::AwaitExpression:
       MOZ_TRY_VAR(result, parseInterfaceAwaitExpression(start, kind, fields));
       break;
-    case BinASTKind::BinaryExpression:
+    case BinKind::BinaryExpression:
       MOZ_TRY_VAR(result, parseInterfaceBinaryExpression(start, kind, fields));
       break;
-    case BinASTKind::CallExpression:
+    case BinKind::CallExpression:
       MOZ_TRY_VAR(result, parseInterfaceCallExpression(start, kind, fields));
       break;
-    case BinASTKind::ClassExpression:
+    case BinKind::ClassExpression:
       MOZ_TRY_VAR(result, parseInterfaceClassExpression(start, kind, fields));
       break;
-    case BinASTKind::CompoundAssignmentExpression:
+    case BinKind::CompoundAssignmentExpression:
       MOZ_TRY_VAR(result, parseInterfaceCompoundAssignmentExpression(
                               start, kind, fields));
       break;
-    case BinASTKind::ComputedMemberExpression:
+    case BinKind::ComputedMemberExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceComputedMemberExpression(start, kind, fields));
       break;
-    case BinASTKind::ConditionalExpression:
+    case BinKind::ConditionalExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceConditionalExpression(start, kind, fields));
       break;
-    case BinASTKind::EagerArrowExpressionWithExpression:
+    case BinKind::EagerArrowExpressionWithExpression:
       MOZ_TRY_VAR(result, parseInterfaceEagerArrowExpressionWithExpression(
                               start, kind, fields));
       break;
-    case BinASTKind::EagerArrowExpressionWithFunctionBody:
+    case BinKind::EagerArrowExpressionWithFunctionBody:
       MOZ_TRY_VAR(result, parseInterfaceEagerArrowExpressionWithFunctionBody(
                               start, kind, fields));
       break;
-    case BinASTKind::EagerFunctionExpression:
+    case BinKind::EagerFunctionExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceEagerFunctionExpression(start, kind, fields));
       break;
-    case BinASTKind::IdentifierExpression:
+    case BinKind::IdentifierExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceIdentifierExpression(start, kind, fields));
       break;
-    case BinASTKind::LazyArrowExpressionWithExpression:
+    case BinKind::LazyArrowExpressionWithExpression:
       MOZ_TRY_VAR(result, parseInterfaceLazyArrowExpressionWithExpression(
                               start, kind, fields));
       break;
-    case BinASTKind::LazyArrowExpressionWithFunctionBody:
+    case BinKind::LazyArrowExpressionWithFunctionBody:
       MOZ_TRY_VAR(result, parseInterfaceLazyArrowExpressionWithFunctionBody(
                               start, kind, fields));
       break;
-    case BinASTKind::LazyFunctionExpression:
+    case BinKind::LazyFunctionExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLazyFunctionExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralBooleanExpression:
+    case BinKind::LiteralBooleanExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralBooleanExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralInfinityExpression:
+    case BinKind::LiteralInfinityExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralInfinityExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralNullExpression:
+    case BinKind::LiteralNullExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralNullExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralNumericExpression:
+    case BinKind::LiteralNumericExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralNumericExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralRegExpExpression:
+    case BinKind::LiteralRegExpExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralRegExpExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralStringExpression:
+    case BinKind::LiteralStringExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralStringExpression(start, kind, fields));
       break;
-    case BinASTKind::NewExpression:
+    case BinKind::NewExpression:
       MOZ_TRY_VAR(result, parseInterfaceNewExpression(start, kind, fields));
       break;
-    case BinASTKind::NewTargetExpression:
+    case BinKind::NewTargetExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceNewTargetExpression(start, kind, fields));
       break;
-    case BinASTKind::ObjectExpression:
+    case BinKind::ObjectExpression:
       MOZ_TRY_VAR(result, parseInterfaceObjectExpression(start, kind, fields));
       break;
-    case BinASTKind::SpreadElement:
+    case BinKind::SpreadElement:
       MOZ_TRY_VAR(result, parseInterfaceSpreadElement(start, kind, fields));
       break;
-    case BinASTKind::StaticMemberExpression:
+    case BinKind::StaticMemberExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceStaticMemberExpression(start, kind, fields));
       break;
-    case BinASTKind::TemplateExpression:
+    case BinKind::TemplateExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceTemplateExpression(start, kind, fields));
       break;
-    case BinASTKind::ThisExpression:
+    case BinKind::ThisExpression:
       MOZ_TRY_VAR(result, parseInterfaceThisExpression(start, kind, fields));
       break;
-    case BinASTKind::UnaryExpression:
+    case BinKind::UnaryExpression:
       MOZ_TRY_VAR(result, parseInterfaceUnaryExpression(start, kind, fields));
       break;
-    case BinASTKind::UpdateExpression:
+    case BinKind::UpdateExpression:
       MOZ_TRY_VAR(result, parseInterfaceUpdateExpression(start, kind, fields));
       break;
-    case BinASTKind::YieldExpression:
+    case BinKind::YieldExpression:
       MOZ_TRY_VAR(result, parseInterfaceYieldExpression(start, kind, fields));
       break;
-    case BinASTKind::YieldStarExpression:
+    case BinKind::YieldStarExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceYieldStarExpression(start, kind, fields));
       break;
     default:
       return raiseInvalidKind("SpreadElementOrExpression", kind);
   }
   return result;
 }
@@ -1037,277 +1037,277 @@ Statement ::= Block
     TryCatchStatement
     TryFinallyStatement
     VariableDeclaration
     WhileStatement
     WithStatement
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseStatement() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
   const auto start = tokenizer_->offset();
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
 
   BINJS_MOZ_TRY_DECL(result, parseSumStatement(start, kind, fields));
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseSumStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   ParseNode* result;
   switch (kind) {
-    case BinASTKind::Block:
+    case BinKind::Block:
       MOZ_TRY_VAR(result, parseInterfaceBlock(start, kind, fields));
       break;
-    case BinASTKind::BreakStatement:
+    case BinKind::BreakStatement:
       MOZ_TRY_VAR(result, parseInterfaceBreakStatement(start, kind, fields));
       break;
-    case BinASTKind::ClassDeclaration:
+    case BinKind::ClassDeclaration:
       MOZ_TRY_VAR(result, parseInterfaceClassDeclaration(start, kind, fields));
       break;
-    case BinASTKind::ContinueStatement:
+    case BinKind::ContinueStatement:
       MOZ_TRY_VAR(result, parseInterfaceContinueStatement(start, kind, fields));
       break;
-    case BinASTKind::DebuggerStatement:
+    case BinKind::DebuggerStatement:
       MOZ_TRY_VAR(result, parseInterfaceDebuggerStatement(start, kind, fields));
       break;
-    case BinASTKind::DoWhileStatement:
+    case BinKind::DoWhileStatement:
       MOZ_TRY_VAR(result, parseInterfaceDoWhileStatement(start, kind, fields));
       break;
-    case BinASTKind::EagerFunctionDeclaration:
+    case BinKind::EagerFunctionDeclaration:
       MOZ_TRY_VAR(result,
                   parseInterfaceEagerFunctionDeclaration(start, kind, fields));
       break;
-    case BinASTKind::EmptyStatement:
+    case BinKind::EmptyStatement:
       MOZ_TRY_VAR(result, parseInterfaceEmptyStatement(start, kind, fields));
       break;
-    case BinASTKind::ExpressionStatement:
+    case BinKind::ExpressionStatement:
       MOZ_TRY_VAR(result,
                   parseInterfaceExpressionStatement(start, kind, fields));
       break;
-    case BinASTKind::ForInStatement:
+    case BinKind::ForInStatement:
       MOZ_TRY_VAR(result, parseInterfaceForInStatement(start, kind, fields));
       break;
-    case BinASTKind::ForOfStatement:
+    case BinKind::ForOfStatement:
       MOZ_TRY_VAR(result, parseInterfaceForOfStatement(start, kind, fields));
       break;
-    case BinASTKind::ForStatement:
+    case BinKind::ForStatement:
       MOZ_TRY_VAR(result, parseInterfaceForStatement(start, kind, fields));
       break;
-    case BinASTKind::IfStatement:
+    case BinKind::IfStatement:
       MOZ_TRY_VAR(result, parseInterfaceIfStatement(start, kind, fields));
       break;
-    case BinASTKind::LabelledStatement:
+    case BinKind::LabelledStatement:
       MOZ_TRY_VAR(result, parseInterfaceLabelledStatement(start, kind, fields));
       break;
-    case BinASTKind::LazyFunctionDeclaration:
+    case BinKind::LazyFunctionDeclaration:
       MOZ_TRY_VAR(result,
                   parseInterfaceLazyFunctionDeclaration(start, kind, fields));
       break;
-    case BinASTKind::ReturnStatement:
+    case BinKind::ReturnStatement:
       MOZ_TRY_VAR(result, parseInterfaceReturnStatement(start, kind, fields));
       break;
-    case BinASTKind::SwitchStatement:
+    case BinKind::SwitchStatement:
       MOZ_TRY_VAR(result, parseInterfaceSwitchStatement(start, kind, fields));
       break;
-    case BinASTKind::SwitchStatementWithDefault:
+    case BinKind::SwitchStatementWithDefault:
       MOZ_TRY_VAR(result, parseInterfaceSwitchStatementWithDefault(start, kind,
                                                                    fields));
       break;
-    case BinASTKind::ThrowStatement:
+    case BinKind::ThrowStatement:
       MOZ_TRY_VAR(result, parseInterfaceThrowStatement(start, kind, fields));
       break;
-    case BinASTKind::TryCatchStatement:
+    case BinKind::TryCatchStatement:
       MOZ_TRY_VAR(result, parseInterfaceTryCatchStatement(start, kind, fields));
       break;
-    case BinASTKind::TryFinallyStatement:
+    case BinKind::TryFinallyStatement:
       MOZ_TRY_VAR(result,
                   parseInterfaceTryFinallyStatement(start, kind, fields));
       break;
-    case BinASTKind::VariableDeclaration:
+    case BinKind::VariableDeclaration:
       MOZ_TRY_VAR(result,
                   parseInterfaceVariableDeclaration(start, kind, fields));
       break;
-    case BinASTKind::WhileStatement:
+    case BinKind::WhileStatement:
       MOZ_TRY_VAR(result, parseInterfaceWhileStatement(start, kind, fields));
       break;
-    case BinASTKind::WithStatement:
+    case BinKind::WithStatement:
       MOZ_TRY_VAR(result, parseInterfaceWithStatement(start, kind, fields));
       break;
     default:
       return raiseInvalidKind("Statement", kind);
   }
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseSumVariableDeclarationOrExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   ParseNode* result;
   switch (kind) {
-    case BinASTKind::ArrayExpression:
+    case BinKind::ArrayExpression:
       MOZ_TRY_VAR(result, parseInterfaceArrayExpression(start, kind, fields));
       break;
-    case BinASTKind::AssignmentExpression:
+    case BinKind::AssignmentExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceAssignmentExpression(start, kind, fields));
       break;
-    case BinASTKind::AwaitExpression:
+    case BinKind::AwaitExpression:
       MOZ_TRY_VAR(result, parseInterfaceAwaitExpression(start, kind, fields));
       break;
-    case BinASTKind::BinaryExpression:
+    case BinKind::BinaryExpression:
       MOZ_TRY_VAR(result, parseInterfaceBinaryExpression(start, kind, fields));
       break;
-    case BinASTKind::CallExpression:
+    case BinKind::CallExpression:
       MOZ_TRY_VAR(result, parseInterfaceCallExpression(start, kind, fields));
       break;
-    case BinASTKind::ClassExpression:
+    case BinKind::ClassExpression:
       MOZ_TRY_VAR(result, parseInterfaceClassExpression(start, kind, fields));
       break;
-    case BinASTKind::CompoundAssignmentExpression:
+    case BinKind::CompoundAssignmentExpression:
       MOZ_TRY_VAR(result, parseInterfaceCompoundAssignmentExpression(
                               start, kind, fields));
       break;
-    case BinASTKind::ComputedMemberExpression:
+    case BinKind::ComputedMemberExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceComputedMemberExpression(start, kind, fields));
       break;
-    case BinASTKind::ConditionalExpression:
+    case BinKind::ConditionalExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceConditionalExpression(start, kind, fields));
       break;
-    case BinASTKind::EagerArrowExpressionWithExpression:
+    case BinKind::EagerArrowExpressionWithExpression:
       MOZ_TRY_VAR(result, parseInterfaceEagerArrowExpressionWithExpression(
                               start, kind, fields));
       break;
-    case BinASTKind::EagerArrowExpressionWithFunctionBody:
+    case BinKind::EagerArrowExpressionWithFunctionBody:
       MOZ_TRY_VAR(result, parseInterfaceEagerArrowExpressionWithFunctionBody(
                               start, kind, fields));
       break;
-    case BinASTKind::EagerFunctionExpression:
+    case BinKind::EagerFunctionExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceEagerFunctionExpression(start, kind, fields));
       break;
-    case BinASTKind::IdentifierExpression:
+    case BinKind::IdentifierExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceIdentifierExpression(start, kind, fields));
       break;
-    case BinASTKind::LazyArrowExpressionWithExpression:
+    case BinKind::LazyArrowExpressionWithExpression:
       MOZ_TRY_VAR(result, parseInterfaceLazyArrowExpressionWithExpression(
                               start, kind, fields));
       break;
-    case BinASTKind::LazyArrowExpressionWithFunctionBody:
+    case BinKind::LazyArrowExpressionWithFunctionBody:
       MOZ_TRY_VAR(result, parseInterfaceLazyArrowExpressionWithFunctionBody(
                               start, kind, fields));
       break;
-    case BinASTKind::LazyFunctionExpression:
+    case BinKind::LazyFunctionExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLazyFunctionExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralBooleanExpression:
+    case BinKind::LiteralBooleanExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralBooleanExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralInfinityExpression:
+    case BinKind::LiteralInfinityExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralInfinityExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralNullExpression:
+    case BinKind::LiteralNullExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralNullExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralNumericExpression:
+    case BinKind::LiteralNumericExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralNumericExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralRegExpExpression:
+    case BinKind::LiteralRegExpExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralRegExpExpression(start, kind, fields));
       break;
-    case BinASTKind::LiteralStringExpression:
+    case BinKind::LiteralStringExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceLiteralStringExpression(start, kind, fields));
       break;
-    case BinASTKind::NewExpression:
+    case BinKind::NewExpression:
       MOZ_TRY_VAR(result, parseInterfaceNewExpression(start, kind, fields));
       break;
-    case BinASTKind::NewTargetExpression:
+    case BinKind::NewTargetExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceNewTargetExpression(start, kind, fields));
       break;
-    case BinASTKind::ObjectExpression:
+    case BinKind::ObjectExpression:
       MOZ_TRY_VAR(result, parseInterfaceObjectExpression(start, kind, fields));
       break;
-    case BinASTKind::StaticMemberExpression:
+    case BinKind::StaticMemberExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceStaticMemberExpression(start, kind, fields));
       break;
-    case BinASTKind::TemplateExpression:
+    case BinKind::TemplateExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceTemplateExpression(start, kind, fields));
       break;
-    case BinASTKind::ThisExpression:
+    case BinKind::ThisExpression:
       MOZ_TRY_VAR(result, parseInterfaceThisExpression(start, kind, fields));
       break;
-    case BinASTKind::UnaryExpression:
+    case BinKind::UnaryExpression:
       MOZ_TRY_VAR(result, parseInterfaceUnaryExpression(start, kind, fields));
       break;
-    case BinASTKind::UpdateExpression:
+    case BinKind::UpdateExpression:
       MOZ_TRY_VAR(result, parseInterfaceUpdateExpression(start, kind, fields));
       break;
-    case BinASTKind::VariableDeclaration:
+    case BinKind::VariableDeclaration:
       MOZ_TRY_VAR(result,
                   parseInterfaceVariableDeclaration(start, kind, fields));
       break;
-    case BinASTKind::YieldExpression:
+    case BinKind::YieldExpression:
       MOZ_TRY_VAR(result, parseInterfaceYieldExpression(start, kind, fields));
       break;
-    case BinASTKind::YieldStarExpression:
+    case BinKind::YieldStarExpression:
       MOZ_TRY_VAR(result,
                   parseInterfaceYieldStarExpression(start, kind, fields));
       break;
     default:
       return raiseInvalidKind("VariableDeclarationOrExpression", kind);
   }
   return result;
 }
 
 // ----- 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 BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::ArrayExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::ArrayExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Elements};
+  const BinField expected_fields[1] = {BinField::Elements};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(elements, parseListOfOptionalSpreadElementOrExpression());
 
   if (elements->empty()) {
     elements->setHasNonConstInitializer();
   }
@@ -1318,41 +1318,41 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 /*
  interface AssertedBlockScope : Node {
     FrozenArray<AssertedDeclaredName> declaredNames;
     bool hasDirectEval;
  }
 */
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseAssertedBlockScope() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::AssertedBlockScope) {
+  if (kind != BinKind::AssertedBlockScope) {
     return raiseInvalidKind("AssertedBlockScope", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result,
                      parseInterfaceAssertedBlockScope(start, kind, fields));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseInterfaceAssertedBlockScope(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::AssertedBlockScope);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::AssertedBlockScope);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::DeclaredNames,
-                                          BinASTField::HasDirectEval};
+  const BinField expected_fields[2] = {BinField::DeclaredNames,
+                                       BinField::HasDirectEval};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto scopeKind = AssertedScopeKind::Block;
 
   MOZ_TRY(parseListOfAssertedDeclaredName(scopeKind));
 
   BINJS_MOZ_TRY_DECL(hasDirectEval, tokenizer_->readBool());
   if (hasDirectEval) {
@@ -1372,42 +1372,41 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
  interface AssertedBoundName : Node {
     [IdentifierName] string name;
     bool isCaptured;
  }
 */
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseAssertedBoundName(
     AssertedScopeKind scopeKind) {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::AssertedBoundName) {
+  if (kind != BinKind::AssertedBoundName) {
     return raiseInvalidKind("AssertedBoundName", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(
       result, parseInterfaceAssertedBoundName(start, kind, fields, scopeKind));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseInterfaceAssertedBoundName(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields,
+    const size_t start, const BinKind kind, const BinFields& fields,
     AssertedScopeKind scopeKind) {
-  MOZ_ASSERT(kind == BinASTKind::AssertedBoundName);
+  MOZ_ASSERT(kind == BinKind::AssertedBoundName);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Name,
-                                          BinASTField::IsCaptured};
+  const BinField expected_fields[2] = {BinField::Name, BinField::IsCaptured};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const bool allowDuplicateName = false;
 
   RootedAtom name(cx_);
   MOZ_TRY_VAR(name, tokenizer_->readIdentifierName());
 
   BINJS_MOZ_TRY_DECL(isCaptured, tokenizer_->readBool());
@@ -1423,41 +1422,41 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
 /*
  interface AssertedBoundNamesScope : Node {
     FrozenArray<AssertedBoundName> boundNames;
     bool hasDirectEval;
  }
 */
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseAssertedBoundNamesScope() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::AssertedBoundNamesScope) {
+  if (kind != BinKind::AssertedBoundNamesScope) {
     return raiseInvalidKind("AssertedBoundNamesScope", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(
       result, parseInterfaceAssertedBoundNamesScope(start, kind, fields));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseInterfaceAssertedBoundNamesScope(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::AssertedBoundNamesScope);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::AssertedBoundNamesScope);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::BoundNames,
-                                          BinASTField::HasDirectEval};
+  const BinField expected_fields[2] = {BinField::BoundNames,
+                                       BinField::HasDirectEval};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto scopeKind = AssertedScopeKind::Catch;
 
   MOZ_TRY(parseListOfAssertedBoundName(scopeKind));
 
   BINJS_MOZ_TRY_DECL(hasDirectEval, tokenizer_->readBool());
   if (hasDirectEval) {
@@ -1478,42 +1477,42 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
     [IdentifierName] string name;
     AssertedDeclaredKind kind;
     bool isCaptured;
  }
 */
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseAssertedDeclaredName(
     AssertedScopeKind scopeKind) {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::AssertedDeclaredName) {
+  if (kind != BinKind::AssertedDeclaredName) {
     return raiseInvalidKind("AssertedDeclaredName", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result, parseInterfaceAssertedDeclaredName(
                                  start, kind, fields, scopeKind));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseInterfaceAssertedDeclaredName(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields,
+    const size_t start, const BinKind kind, const BinFields& fields,
     AssertedScopeKind scopeKind) {
-  MOZ_ASSERT(kind == BinASTKind::AssertedDeclaredName);
+  MOZ_ASSERT(kind == BinKind::AssertedDeclaredName);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[3] = {BinASTField::Name, BinASTField::Kind,
-                                          BinASTField::IsCaptured};
+  const BinField expected_fields[3] = {BinField::Name, BinField::Kind,
+                                       BinField::IsCaptured};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const bool allowDuplicateName = false;
 
   RootedAtom name(cx_);
   MOZ_TRY_VAR(name, tokenizer_->readIdentifierName());
 
   BINJS_MOZ_TRY_DECL(kind_, parseAssertedDeclaredKind());
@@ -1538,43 +1537,43 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
     FrozenArray<AssertedMaybePositionalParameterName> paramNames;
     bool hasDirectEval;
     bool isSimpleParameterList;
  }
 */
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseAssertedParameterScope(
     MutableHandle<GCVector<JSAtom*>> positionalParams) {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::AssertedParameterScope) {
+  if (kind != BinKind::AssertedParameterScope) {
     return raiseInvalidKind("AssertedParameterScope", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result, parseInterfaceAssertedParameterScope(
                                  start, kind, fields, positionalParams));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseInterfaceAssertedParameterScope(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields,
+    const size_t start, const BinKind kind, const BinFields& fields,
     MutableHandle<GCVector<JSAtom*>> positionalParams) {
-  MOZ_ASSERT(kind == BinASTKind::AssertedParameterScope);
+  MOZ_ASSERT(kind == BinKind::AssertedParameterScope);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[3] = {BinASTField::ParamNames,
-                                          BinASTField::HasDirectEval,
-                                          BinASTField::IsSimpleParameterList};
+  const BinField expected_fields[3] = {BinField::ParamNames,
+                                       BinField::HasDirectEval,
+                                       BinField::IsSimpleParameterList};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto scopeKind = AssertedScopeKind::Parameter;
 
   MOZ_TRY(parseListOfAssertedMaybePositionalParameterName(scopeKind,
                                                           positionalParams));
 
   BINJS_MOZ_TRY_DECL(hasDirectEval, tokenizer_->readBool());
@@ -1590,25 +1589,25 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
     pc_->functionBox()->setHasExtensibleScope();
   }
   auto result = Ok();
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseInterfaceAssertedPositionalParameterName(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields,
+    const size_t start, const BinKind kind, const BinFields& fields,
     AssertedScopeKind scopeKind,
     MutableHandle<GCVector<JSAtom*>> positionalParams) {
-  MOZ_ASSERT(kind == BinASTKind::AssertedPositionalParameterName);
+  MOZ_ASSERT(kind == BinKind::AssertedPositionalParameterName);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[3] = {BinASTField::Index, BinASTField::Name,
-                                          BinASTField::IsCaptured};
+  const BinField expected_fields[3] = {BinField::Index, BinField::Name,
+                                       BinField::IsCaptured};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   bool allowDuplicateName = !pc_->sc()->strict();
 
   BINJS_MOZ_TRY_DECL(index, tokenizer_->readUnsignedLong());
 
   RootedAtom name(cx_);
   MOZ_TRY_VAR(name, tokenizer_->readIdentifierName());
@@ -1647,41 +1646,41 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
 /*
  interface AssertedScriptGlobalScope : Node {
     FrozenArray<AssertedDeclaredName> declaredNames;
     bool hasDirectEval;
  }
 */
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseAssertedScriptGlobalScope() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::AssertedScriptGlobalScope) {
+  if (kind != BinKind::AssertedScriptGlobalScope) {
     return raiseInvalidKind("AssertedScriptGlobalScope", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(
       result, parseInterfaceAssertedScriptGlobalScope(start, kind, fields));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseInterfaceAssertedScriptGlobalScope(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::AssertedScriptGlobalScope);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::AssertedScriptGlobalScope);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::DeclaredNames,
-                                          BinASTField::HasDirectEval};
+  const BinField expected_fields[2] = {BinField::DeclaredNames,
+                                       BinField::HasDirectEval};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto scopeKind = AssertedScopeKind::Global;
 
   MOZ_TRY(parseListOfAssertedDeclaredName(scopeKind));
 
   BINJS_MOZ_TRY_DECL(hasDirectEval, tokenizer_->readBool());
   if (hasDirectEval) {
@@ -1700,41 +1699,41 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
 /*
  interface AssertedVarScope : Node {
     FrozenArray<AssertedDeclaredName> declaredNames;
     bool hasDirectEval;
  }
 */
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseAssertedVarScope() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::AssertedVarScope) {
+  if (kind != BinKind::AssertedVarScope) {
     return raiseInvalidKind("AssertedVarScope", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result,
                      parseInterfaceAssertedVarScope(start, kind, fields));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseInterfaceAssertedVarScope(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::AssertedVarScope);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::AssertedVarScope);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::DeclaredNames,
-                                          BinASTField::HasDirectEval};
+  const BinField expected_fields[2] = {BinField::DeclaredNames,
+                                       BinField::HasDirectEval};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto scopeKind = AssertedScopeKind::Var;
 
   MOZ_TRY(parseListOfAssertedDeclaredName(scopeKind));
 
   BINJS_MOZ_TRY_DECL(hasDirectEval, tokenizer_->readBool());
   if (hasDirectEval) {
@@ -1747,73 +1746,72 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
     pc_->functionBox()->setHasExtensibleScope();
   }
   auto result = Ok();
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceAssignmentExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::AssignmentExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::AssignmentExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Binding,
-                                          BinASTField::Expression};
+  const BinField expected_fields[2] = {BinField::Binding, BinField::Expression};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(binding, parseAssignmentTarget());
 
   BINJS_MOZ_TRY_DECL(expression, parseExpression());
 
   BINJS_TRY_DECL(result, handler_.newAssignment(ParseNodeKind::AssignExpr,
                                                 binding, expression));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceAssignmentTargetIdentifier(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::AssignmentTargetIdentifier);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::AssignmentTargetIdentifier);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Name};
+  const BinField expected_fields[1] = {BinField::Name};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   RootedAtom name(cx_);
   MOZ_TRY_VAR(name, tokenizer_->readIdentifierName());
 
   BINJS_TRY(usedNames_.noteUse(cx_, name, pc_->scriptId(),
                                pc_->innermostScope()->id()));
   BINJS_TRY_DECL(result, handler_.newName(name->asPropertyName(),
                                           tokenizer_->pos(start), cx_));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceAwaitExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::BinaryExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::BinaryExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[3] = {
-      BinASTField::Operator, BinASTField::Left, BinASTField::Right};
+  const BinField expected_fields[3] = {BinField::Operator, BinField::Left,
+                                       BinField::Right};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(operator_, parseBinaryOperator());
 
   BINJS_MOZ_TRY_DECL(left, parseExpression());
 
   BINJS_MOZ_TRY_DECL(right, parseExpression());
@@ -1915,91 +1913,90 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
 /*
  interface BindingIdentifier : Node {
     [IdentifierName] string name;
  }
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseBindingIdentifier() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::BindingIdentifier) {
+  if (kind != BinKind::BindingIdentifier) {
     return raiseInvalidKind("BindingIdentifier", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result,
                      parseInterfaceBindingIdentifier(start, kind, fields));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceBindingIdentifier(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::BindingIdentifier);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::BindingIdentifier);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Name};
+  const BinField expected_fields[1] = {BinField::Name};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   RootedAtom name(cx_);
   MOZ_TRY_VAR(name, tokenizer_->readIdentifierName());
 
   BINJS_TRY_DECL(result, handler_.newName(name->asPropertyName(),
                                           tokenizer_->pos(start), cx_));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceBindingWithInitializer(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   return raiseError(
       "FIXME: Not implemented yet in this preview release "
       "(BindingWithInitializer)");
 }
 
 /*
  interface Block : Node {
     AssertedBlockScope scope;
     FrozenArray<Statement> statements;
  }
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseBlock() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::Block) {
+  if (kind != BinKind::Block) {
     return raiseInvalidKind("Block", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result, parseInterfaceBlock(start, kind, fields));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceBlock(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::Block);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::Block);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Scope,
-                                          BinASTField::Statements};
+  const BinField expected_fields[2] = {BinField::Scope, BinField::Statements};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   ParseContext::Statement stmt(pc_, StatementKind::Block);
   ParseContext::Scope currentScope(cx_, pc_, usedNames_);
   BINJS_TRY(currentScope.init(pc_));
 
   MOZ_TRY(parseAssertedBlockScope());
 
@@ -2008,22 +2005,22 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   MOZ_TRY(checkClosedVars(currentScope));
   BINJS_TRY_DECL(bindings, NewLexicalScopeData(cx_, currentScope, alloc_, pc_));
   BINJS_TRY_DECL(result, handler_.newLexicalScope(*bindings, statements));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceBreakStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::BreakStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::BreakStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Label};
+  const BinField expected_fields[1] = {BinField::Label};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   RootedAtom label(cx_);
   MOZ_TRY_VAR(label, tokenizer_->readMaybeAtom());
 
   if (label) {
     if (!IsIdentifier(label)) {
       return raiseError("Invalid identifier");
@@ -2046,23 +2043,22 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   BINJS_TRY_DECL(result, handler_.newBreakStatement(
                              label ? label->asPropertyName() : nullptr,
                              tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceCallExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::CallExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::CallExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Callee,
-                                          BinASTField::Arguments};
+  const BinField expected_fields[2] = {BinField::Callee, BinField::Arguments};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(callee, parseExpressionOrSuper());
 
   BINJS_MOZ_TRY_DECL(arguments, parseArguments());
 
   auto op = JSOP_CALL;
@@ -2101,40 +2097,40 @@ JS::Result<ParseNode*> BinASTParser<Tok>
  interface CatchClause : Node {
     AssertedBoundNamesScope bindingScope;
     Binding binding;
     Block body;
  }
 */
 template <typename Tok>
 JS::Result<LexicalScopeNode*> BinASTParser<Tok>::parseCatchClause() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::CatchClause) {
+  if (kind != BinKind::CatchClause) {
     return raiseInvalidKind("CatchClause", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result, parseInterfaceCatchClause(start, kind, fields));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<LexicalScopeNode*> BinASTParser<Tok>::parseInterfaceCatchClause(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::CatchClause);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::CatchClause);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[3] = {
-      BinASTField::BindingScope, BinASTField::Binding, BinASTField::Body};
+  const BinField expected_fields[3] = {BinField::BindingScope,
+                                       BinField::Binding, BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   ParseContext::Statement stmt(pc_, StatementKind::Catch);
   ParseContext::Scope currentScope(cx_, pc_, usedNames_);
   BINJS_TRY(currentScope.init(pc_));
 
   MOZ_TRY(parseAssertedBoundNamesScope());
 
@@ -2149,38 +2145,38 @@ JS::Result<LexicalScopeNode*> BinASTPars
   BINJS_TRY_DECL(bindings, NewLexicalScopeData(cx_, currentScope, alloc_, pc_));
   BINJS_TRY_DECL(result, handler_.newLexicalScope(*bindings, body));
   BINJS_TRY(handler_.setupCatchScope(result, binding, body));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceClassDeclaration(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   return raiseError(
       "FIXME: Not implemented yet in this preview release (ClassDeclaration)");
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceClassExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::CompoundAssignmentExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::CompoundAssignmentExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[3] = {
-      BinASTField::Operator, BinASTField::Binding, BinASTField::Expression};
+  const BinField expected_fields[3] = {BinField::Operator, BinField::Binding,
+                                       BinField::Expression};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(operator_, parseCompoundAssignmentOperator());
 
   BINJS_MOZ_TRY_DECL(binding, parseSimpleAssignmentTarget());
 
   BINJS_MOZ_TRY_DECL(expression, parseExpression());
@@ -2226,95 +2222,93 @@ BinASTParser<Tok>::parseInterfaceCompoun
   }
   BINJS_TRY_DECL(result, handler_.newAssignment(pnk, binding, expression));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceComputedMemberAssignmentTarget(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::ComputedMemberAssignmentTarget);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::ComputedMemberAssignmentTarget);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Object,
-                                          BinASTField::Expression};
+  const BinField expected_fields[2] = {BinField::Object, BinField::Expression};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(object, parseExpressionOrSuper());
 
   BINJS_MOZ_TRY_DECL(expression, parseExpression());
 
   BINJS_TRY_DECL(result, handler_.newPropertyByValue(object, expression,
                                                      tokenizer_->offset()));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceComputedMemberExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::ComputedMemberExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::ComputedMemberExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Object,
-                                          BinASTField::Expression};
+  const BinField expected_fields[2] = {BinField::Object, BinField::Expression};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(object, parseExpressionOrSuper());
 
   BINJS_MOZ_TRY_DECL(expression, parseExpression());
 
   BINJS_TRY_DECL(result, handler_.newPropertyByValue(object, expression,
                                                      tokenizer_->offset()));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceComputedPropertyName(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::ConditionalExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::ConditionalExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[3] = {
-      BinASTField::Test, BinASTField::Consequent, BinASTField::Alternate};
+  const BinField expected_fields[3] = {BinField::Test, BinField::Consequent,
+                                       BinField::Alternate};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(test, parseExpression());
 
   BINJS_MOZ_TRY_DECL(consequent, parseExpression());
 
   BINJS_MOZ_TRY_DECL(alternate, parseExpression());
 
   BINJS_TRY_DECL(result, handler_.newConditional(test, consequent, alternate));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceContinueStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::ContinueStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::ContinueStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Label};
+  const BinField expected_fields[1] = {BinField::Label};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   RootedAtom label(cx_);
   MOZ_TRY_VAR(label, tokenizer_->readMaybeAtom());
 
   if (label) {
     if (!IsIdentifier(label)) {
       return raiseError("ContinueStatement - Label MUST be an identifier");
@@ -2337,23 +2331,22 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   BINJS_TRY_DECL(result, handler_.newContinueStatement(
                              label ? label->asPropertyName() : nullptr,
                              tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceDataProperty(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::DataProperty);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::DataProperty);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Name,
-                                          BinASTField::Expression};
+  const BinField expected_fields[2] = {BinField::Name, BinField::Expression};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(name, parsePropertyName());
 
   BINJS_MOZ_TRY_DECL(expression, parseExpression());
 
   if (!handler_.isUsableAsObjectPropertyName(name)) {
@@ -2369,112 +2362,112 @@ JS::Result<ParseNode*> BinASTParser<Tok>
     BINJS_TRY_VAR(result, handler_.newObjectMethodOrPropertyDefinition(
                               name, expression, AccessorType::None));
   }
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceDebuggerStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   return raiseError(
       "FIXME: Not implemented yet in this preview release (DebuggerStatement)");
 }
 
 /*
  interface Directive : Node {
     string rawValue;
  }
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseDirective() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::Directive) {
+  if (kind != BinKind::Directive) {
     return raiseInvalidKind("Directive", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result, parseInterfaceDirective(start, kind, fields));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceDirective(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::Directive);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::Directive);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::RawValue};
+  const BinField expected_fields[1] = {BinField::RawValue};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   RootedAtom rawValue(cx_);
   MOZ_TRY_VAR(rawValue, tokenizer_->readAtom());
 
   TokenPos pos = tokenizer_->pos(start);
   BINJS_TRY_DECL(result, handler_.newStringLiteral(rawValue, pos));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceDoWhileStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::DoWhileStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::DoWhileStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Test, BinASTField::Body};
+  const BinField expected_fields[2] = {BinField::Test, BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   ParseContext::Statement stmt(pc_, StatementKind::DoLoop);
 
   BINJS_MOZ_TRY_DECL(test, parseExpression());
 
   BINJS_MOZ_TRY_DECL(body, parseStatement());
 
   BINJS_TRY_DECL(
       result, handler_.newDoWhileStatement(body, test, tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceEagerArrowExpressionWithExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::EagerFunctionDeclaration);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::EagerFunctionDeclaration);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[6] = {
-      BinASTField::IsAsync, BinASTField::IsGenerator, BinASTField::Name,
-      BinASTField::Length,  BinASTField::Directives,  BinASTField::Contents};
+  const BinField expected_fields[6] = {
+      BinField::IsAsync, BinField::IsGenerator, BinField::Name,
+      BinField::Length,  BinField::Directives,  BinField::Contents};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto syntax = FunctionSyntaxKind::Statement;
 
   BINJS_MOZ_TRY_DECL(isAsync, tokenizer_->readBool());
   if (isAsync) {
     return raiseError(
         "Async function is not supported in this preview release");
@@ -2499,17 +2492,17 @@ BinASTParser<Tok>::parseInterfaceEagerFu
                                        syntax != FunctionSyntaxKind::Getter)
                                           ? name
                                           : nullptr));
 
   forceStrictIfNecessary(funbox, directives);
 
   // Push a new ParseContext. It will be used to parse `scope`, the arguments,
   // the function.
-  BinASTParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
+  BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
   BINJS_TRY(funpc.init());
   pc_->functionScope().useAsVarScope(pc_);
   MOZ_ASSERT(pc_->isFunctionBox());
 
   ParseContext::Scope lexicalScope(cx_, pc_, usedNames_);
   BINJS_TRY(lexicalScope.init(pc_));
   ListNode* params;
   ListNode* body;
@@ -2520,24 +2513,24 @@ BinASTParser<Tok>::parseInterfaceEagerFu
   BINJS_TRY_DECL(bodyScope, handler_.newLexicalScope(*lexicalScopeData, body));
   BINJS_MOZ_TRY_DECL(result,
                      buildFunction(start, kind, name, params, bodyScope));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceEagerFunctionExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::EagerFunctionExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::EagerFunctionExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[6] = {
-      BinASTField::IsAsync, BinASTField::IsGenerator, BinASTField::Name,
-      BinASTField::Length,  BinASTField::Directives,  BinASTField::Contents};
+  const BinField expected_fields[6] = {
+      BinField::IsAsync, BinField::IsGenerator, BinField::Name,
+      BinField::Length,  BinField::Directives,  BinField::Contents};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto syntax = FunctionSyntaxKind::Expression;
 
   BINJS_MOZ_TRY_DECL(isAsync, tokenizer_->readBool());
   if (isAsync) {
     return raiseError(
         "Async function is not supported in this preview release");
@@ -2562,17 +2555,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
                                        syntax != FunctionSyntaxKind::Getter)
                                           ? name
                                           : nullptr));
 
   forceStrictIfNecessary(funbox, directives);
 
   // Push a new ParseContext. It will be used to parse `scope`, the arguments,
   // the function.
-  BinASTParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
+  BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
   BINJS_TRY(funpc.init());
   pc_->functionScope().useAsVarScope(pc_);
   MOZ_ASSERT(pc_->isFunctionBox());
 
   ParseContext::Scope lexicalScope(cx_, pc_, usedNames_);
   BINJS_TRY(lexicalScope.init(pc_));
   ListNode* params;
   ListNode* body;
@@ -2583,23 +2576,23 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   BINJS_TRY_DECL(bodyScope, handler_.newLexicalScope(*lexicalScopeData, body));
   BINJS_MOZ_TRY_DECL(result,
                      buildFunction(start, kind, name, params, bodyScope));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceEagerGetter(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::EagerGetter);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::EagerGetter);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[3] = {
-      BinASTField::Name, BinASTField::Directives, BinASTField::Contents};
+  const BinField expected_fields[3] = {BinField::Name, BinField::Directives,
+                                       BinField::Contents};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto syntax = FunctionSyntaxKind::Setter;
   const bool isGenerator = false;
   const bool isAsync = false;
   const auto accessorType = AccessorType::Getter;
   const uint32_t length = 0;
 
@@ -2617,17 +2610,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
                                        syntax != FunctionSyntaxKind::Getter)
                                           ? name
                                           : nullptr));
 
   forceStrictIfNecessary(funbox, directives);
 
   // Push a new ParseContext. It will be used to parse `scope`, the arguments,
   // the function.
-  BinASTParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
+  BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
   BINJS_TRY(funpc.init());
   pc_->functionScope().useAsVarScope(pc_);
   MOZ_ASSERT(pc_->isFunctionBox());
 
   ParseContext::Scope lexicalScope(cx_, pc_, usedNames_);
   BINJS_TRY(lexicalScope.init(pc_));
   ListNode* params;
   ListNode* body;
@@ -2640,24 +2633,24 @@ JS::Result<ParseNode*> BinASTParser<Tok>
                      buildFunction(start, kind, name, params, bodyScope));
   BINJS_TRY_DECL(result, handler_.newObjectMethodOrPropertyDefinition(
                              name, method, accessorType));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceEagerMethod(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::EagerMethod);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::EagerMethod);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[6] = {
-      BinASTField::IsAsync, BinASTField::IsGenerator, BinASTField::Name,
-      BinASTField::Length,  BinASTField::Directives,  BinASTField::Contents};
+  const BinField expected_fields[6] = {
+      BinField::IsAsync, BinField::IsGenerator, BinField::Name,
+      BinField::Length,  BinField::Directives,  BinField::Contents};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto syntax = FunctionSyntaxKind::Method;
   const auto accessorType = AccessorType::None;
 
   BINJS_MOZ_TRY_DECL(isAsync, tokenizer_->readBool());
   if (isAsync) {
     return raiseError(
@@ -2683,17 +2676,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
                                        syntax != FunctionSyntaxKind::Getter)
                                           ? name
                                           : nullptr));
 
   forceStrictIfNecessary(funbox, directives);
 
   // Push a new ParseContext. It will be used to parse `scope`, the arguments,
   // the function.
-  BinASTParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
+  BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
   BINJS_TRY(funpc.init());
   pc_->functionScope().useAsVarScope(pc_);
   MOZ_ASSERT(pc_->isFunctionBox());
 
   ParseContext::Scope lexicalScope(cx_, pc_, usedNames_);
   BINJS_TRY(lexicalScope.init(pc_));
   ListNode* params;
   ListNode* body;
@@ -2706,24 +2699,24 @@ JS::Result<ParseNode*> BinASTParser<Tok>
                      buildFunction(start, kind, name, params, bodyScope));
   BINJS_TRY_DECL(result, handler_.newObjectMethodOrPropertyDefinition(
                              name, method, accessorType));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceEagerSetter(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::EagerSetter);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::EagerSetter);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[4] = {
-      BinASTField::Name, BinASTField::Length, BinASTField::Directives,
-      BinASTField::Contents};
+  const BinField expected_fields[4] = {BinField::Name, BinField::Length,
+                                       BinField::Directives,
+                                       BinField::Contents};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto syntax = FunctionSyntaxKind::Setter;
   const bool isGenerator = false;
   const bool isAsync = false;
   const auto accessorType = AccessorType::Setter;
 
   BINJS_MOZ_TRY_DECL(name, parsePropertyName());
@@ -2742,17 +2735,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
                                        syntax != FunctionSyntaxKind::Getter)
                                           ? name
                                           : nullptr));
 
   forceStrictIfNecessary(funbox, directives);
 
   // Push a new ParseContext. It will be used to parse `scope`, the arguments,
   // the function.
-  BinASTParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
+  BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
   BINJS_TRY(funpc.init());
   pc_->functionScope().useAsVarScope(pc_);
   MOZ_ASSERT(pc_->isFunctionBox());
 
   ParseContext::Scope lexicalScope(cx_, pc_, usedNames_);
   BINJS_TRY(lexicalScope.init(pc_));
   ListNode* params;
   ListNode* body;
@@ -2765,52 +2758,51 @@ JS::Result<ParseNode*> BinASTParser<Tok>
                      buildFunction(start, kind, name, params, bodyScope));
   BINJS_TRY_DECL(result, handler_.newObjectMethodOrPropertyDefinition(
                              name, method, accessorType));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceEmptyStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::EmptyStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::EmptyStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
   MOZ_TRY(tokenizer_->checkFields0(kind, fields));
 
   BINJS_TRY_DECL(result, handler_.newEmptyStatement(tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceExpressionStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::ExpressionStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::ExpressionStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Expression};
+  const BinField expected_fields[1] = {BinField::Expression};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(expression, parseExpression());
 
   BINJS_TRY_DECL(result,
                  handler_.newExprStatement(expression, tokenizer_->offset()));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceForInOfBinding(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::ForInOfBinding);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::ForInOfBinding);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Kind,
-                                          BinASTField::Binding};
+  const BinField expected_fields[2] = {BinField::Kind, BinField::Binding};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   AutoVariableDeclarationKind kindGuard(this);
 
   BINJS_MOZ_TRY_DECL(kind_, parseVariableDeclarationKind());
 
   BINJS_MOZ_TRY_DECL(binding, parseBinding());
 
@@ -2831,23 +2823,23 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   BINJS_TRY_DECL(result,
                  handler_.newDeclarationList(pnk, tokenizer_->pos(start)));
   handler_.addList(result, binding);
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceForInStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::ForInStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::ForInStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[3] = {BinASTField::Left, BinASTField::Right,
-                                          BinASTField::Body};
+  const BinField expected_fields[3] = {BinField::Left, BinField::Right,
+                                       BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   ParseContext::Statement stmt(pc_, StatementKind::ForInLoop);
 
   // Implicit scope around the `for`, used to store `for (let x in  ...)`
   // or `for (const x in ...)`-style declarations. Detail on the
   // declaration is stored as part of `scope`.
   ParseContext::Scope scope(cx_, pc_, usedNames_);
@@ -2870,31 +2862,30 @@ JS::Result<ParseNode*> BinASTParser<Tok>
     BINJS_TRY_DECL(bindings, NewLexicalScopeData(cx_, scope, alloc_, pc_));
     BINJS_TRY_VAR(result, handler_.newLexicalScope(*bindings, result));
   }
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceForOfStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::ForStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::ForStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[4] = {BinASTField::Init, BinASTField::Test,
-                                          BinASTField::Update,
-                                          BinASTField::Body};
+  const BinField expected_fields[4] = {BinField::Init, BinField::Test,
+                                       BinField::Update, BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   ParseContext::Statement stmt(pc_, StatementKind::ForLoop);
 
   // Implicit scope around the `for`, used to store `for (let x; ...; ...)`
   // or `for (const x; ...; ...)`-style declarations. Detail on the
   // declaration is stored as part of `BINJS_Scope`.
   ParseContext::Scope scope(cx_, pc_, usedNames_);
@@ -2924,41 +2915,40 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 /*
  interface FormalParameters : Node {
     FrozenArray<Parameter> items;
     Binding? rest;
  }
 */
 template <typename Tok>
 JS::Result<ListNode*> BinASTParser<Tok>::parseFormalParameters() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::FormalParameters) {
+  if (kind != BinKind::FormalParameters) {
     return raiseInvalidKind("FormalParameters", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result,
                      parseInterfaceFormalParameters(start, kind, fields));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<ListNode*> BinASTParser<Tok>::parseInterfaceFormalParameters(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::FormalParameters);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::FormalParameters);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Items,
-                                          BinASTField::Rest};
+  const BinField expected_fields[2] = {BinField::Items, BinField::Rest};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(items, parseListOfParameter());
 
   BINJS_MOZ_TRY_DECL(rest, parseOptionalBinding());
 
   auto result = items;
@@ -2977,47 +2967,47 @@ JS::Result<ListNode*> BinASTParser<Tok>:
     FormalParameters params;
     AssertedVarScope bodyScope;
     FunctionBody body;
  }
 */
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseFunctionExpressionContents(
     uint32_t funLength, ListNode** paramsOut, ListNode** bodyOut) {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::FunctionExpressionContents) {
+  if (kind != BinKind::FunctionExpressionContents) {
     return raiseInvalidKind("FunctionExpressionContents", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result,
                      parseInterfaceFunctionExpressionContents(
                          start, kind, fields, funLength, paramsOut, bodyOut));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseInterfaceFunctionExpressionContents(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields,
+    const size_t start, const BinKind kind, const BinFields& fields,
     uint32_t funLength, ListNode** paramsOut, ListNode** bodyOut) {
-  MOZ_ASSERT(kind == BinASTKind::FunctionExpressionContents);
+  MOZ_ASSERT(kind == BinKind::FunctionExpressionContents);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[6] = {BinASTField::IsFunctionNameCaptured,
-                                          BinASTField::IsThisCaptured,
-                                          BinASTField::ParameterScope,
-                                          BinASTField::Params,
-                                          BinASTField::BodyScope,
-                                          BinASTField::Body};
+  const BinField expected_fields[6] = {BinField::IsFunctionNameCaptured,
+                                       BinField::IsThisCaptured,
+                                       BinField::ParameterScope,
+                                       BinField::Params,
+                                       BinField::BodyScope,
+                                       BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(isFunctionNameCaptured, tokenizer_->readBool());
   // Per spec, isFunctionNameCaptured can be true for anonymous
   // function.  Check isFunctionNameCaptured only for named
   // function.
   if (pc_->functionBox()->function()->isNamedLambda() &&
@@ -3050,44 +3040,44 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
     FormalParameters params;
     AssertedVarScope bodyScope;
     FunctionBody body;
  }
 */
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseFunctionOrMethodContents(
     uint32_t funLength, ListNode** paramsOut, ListNode** bodyOut) {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::FunctionOrMethodContents) {
+  if (kind != BinKind::FunctionOrMethodContents) {
     return raiseInvalidKind("FunctionOrMethodContents", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result,
                      parseInterfaceFunctionOrMethodContents(
                          start, kind, fields, funLength, paramsOut, bodyOut));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseInterfaceFunctionOrMethodContents(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields,
+    const size_t start, const BinKind kind, const BinFields& fields,
     uint32_t funLength, ListNode** paramsOut, ListNode** bodyOut) {
-  MOZ_ASSERT(kind == BinASTKind::FunctionOrMethodContents);
+  MOZ_ASSERT(kind == BinKind::FunctionOrMethodContents);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[5] = {
-      BinASTField::IsThisCaptured, BinASTField::ParameterScope,
-      BinASTField::Params, BinASTField::BodyScope, BinASTField::Body};
+  const BinField expected_fields[5] = {
+      BinField::IsThisCaptured, BinField::ParameterScope, BinField::Params,
+      BinField::BodyScope, BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(isThisCaptured, tokenizer_->readBool());
   // TODO: Use this in BinASTParser::buildFunction.
   (void)isThisCaptured;
   Rooted<GCVector<JSAtom*>> positionalParams(cx_, GCVector<JSAtom*>(cx_));
   MOZ_TRY(parseAssertedParameterScope(&positionalParams));
@@ -3111,43 +3101,43 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
     AssertedVarScope bodyScope;
     FunctionBody body;
  }
 */
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseGetterContents(uint32_t funLength,
                                                       ListNode** paramsOut,
                                                       ListNode** bodyOut) {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::GetterContents) {
+  if (kind != BinKind::GetterContents) {
     return raiseInvalidKind("GetterContents", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(
       result, parseInterfaceGetterContents(start, kind, fields, funLength,
                                            paramsOut, bodyOut));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseInterfaceGetterContents(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields,
+    const size_t start, const BinKind kind, const BinFields& fields,
     uint32_t funLength, ListNode** paramsOut, ListNode** bodyOut) {
-  MOZ_ASSERT(kind == BinASTKind::GetterContents);
+  MOZ_ASSERT(kind == BinKind::GetterContents);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[3] = {
-      BinASTField::IsThisCaptured, BinASTField::BodyScope, BinASTField::Body};
+  const BinField expected_fields[3] = {BinField::IsThisCaptured,
+                                       BinField::BodyScope, BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(isThisCaptured, tokenizer_->readBool());
   // TODO: Use this in BinASTParser::buildFunction.
   (void)isThisCaptured;
   MOZ_TRY(parseAssertedVarScope());
 
@@ -3162,85 +3152,84 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
 
 /*
  interface IdentifierExpression : Node {
     [IdentifierName] string name;
  }
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseIdentifierExpression() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::IdentifierExpression) {
+  if (kind != BinKind::IdentifierExpression) {
     return raiseInvalidKind("IdentifierExpression", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result,
                      parseInterfaceIdentifierExpression(start, kind, fields));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceIdentifierExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::IdentifierExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::IdentifierExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Name};
+  const BinField expected_fields[1] = {BinField::Name};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   RootedAtom name(cx_);
   MOZ_TRY_VAR(name, tokenizer_->readIdentifierName());
 
   BINJS_TRY(usedNames_.noteUse(cx_, name, pc_->scriptId(),
                                pc_->innermostScope()->id()));
   BINJS_TRY_DECL(result, handler_.newName(name->asPropertyName(),
                                           tokenizer_->pos(start), cx_));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceIfStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::IfStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::IfStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[3] = {
-      BinASTField::Test, BinASTField::Consequent, BinASTField::Alternate};
+  const BinField expected_fields[3] = {BinField::Test, BinField::Consequent,
+                                       BinField::Alternate};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(test, parseExpression());
 
   BINJS_MOZ_TRY_DECL(consequent, parseStatement());
 
   BINJS_MOZ_TRY_DECL(alternate, parseOptionalStatement());
 
   BINJS_TRY_DECL(result,
                  handler_.newIfStatement(start, test, consequent, alternate));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceLabelledStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::LabelledStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::LabelledStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Label,
-                                          BinASTField::Body};
+  const BinField expected_fields[2] = {BinField::Label, BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   RootedAtom label(cx_);
   MOZ_TRY_VAR(label, tokenizer_->readAtom());
   if (!IsIdentifier(label)) {
     return raiseError("Invalid identifier");
   }
@@ -3250,42 +3239,42 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   BINJS_TRY_DECL(result, handler_.newLabeledStatement(label->asPropertyName(),
                                                       body, start));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceLazyArrowExpressionWithExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::LazyFunctionDeclaration);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::LazyFunctionDeclaration);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[7] = {
-      BinASTField::IsAsync, BinASTField::IsGenerator, BinASTField::Name,
-      BinASTField::Length,  BinASTField::Directives,  BinASTField::ContentsSkip,
-      BinASTField::Contents};
+  const BinField expected_fields[7] = {
+      BinField::IsAsync, BinField::IsGenerator, BinField::Name,
+      BinField::Length,  BinField::Directives,  BinField::ContentsSkip,
+      BinField::Contents};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto syntax = FunctionSyntaxKind::Statement;
 
   BINJS_MOZ_TRY_DECL(isAsync, tokenizer_->readBool());
   if (isAsync) {
     return raiseError(
         "Async function is not supported in this preview release");
@@ -3332,25 +3321,25 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   funbox->function()->initLazyScript(lazy);
 
   BINJS_MOZ_TRY_DECL(result, makeEmptyFunctionNode(skipStart, kind, funbox));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceLazyFunctionExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::LazyFunctionExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::LazyFunctionExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[7] = {
-      BinASTField::IsAsync, BinASTField::IsGenerator, BinASTField::Name,
-      BinASTField::Length,  BinASTField::Directives,  BinASTField::ContentsSkip,
-      BinASTField::Contents};
+  const BinField expected_fields[7] = {
+      BinField::IsAsync, BinField::IsGenerator, BinField::Name,
+      BinField::Length,  BinField::Directives,  BinField::ContentsSkip,
+      BinField::Contents};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto syntax = FunctionSyntaxKind::Expression;
 
   BINJS_MOZ_TRY_DECL(isAsync, tokenizer_->readBool());
   if (isAsync) {
     return raiseError(
         "Async function is not supported in this preview release");
@@ -3397,101 +3386,101 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   funbox->function()->initLazyScript(lazy);
 
   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 BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::LiteralBooleanExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::LiteralBooleanExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Value};
+  const BinField expected_fields[1] = {BinField::Value};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(value, tokenizer_->readBool());
 
   BINJS_TRY_DECL(result,
                  handler_.newBooleanLiteral(value, tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceLiteralInfinityExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::LiteralNullExpression);
+    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));
 
   BINJS_TRY_DECL(result, handler_.newNullLiteral(tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceLiteralNumericExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::LiteralNumericExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::LiteralNumericExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Value};
+  const BinField expected_fields[1] = {BinField::Value};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(value, tokenizer_->readDouble());
 
   BINJS_TRY_DECL(result, handler_.newNumber(value, DecimalPoint::HasDecimal,
                                             tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceLiteralPropertyName(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::LiteralPropertyName);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::LiteralPropertyName);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Value};
+  const BinField expected_fields[1] = {BinField::Value};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   RootedAtom value(cx_);
   MOZ_TRY_VAR(value, tokenizer_->readAtom());
 
   ParseNode* result;
   uint32_t index;
@@ -3503,23 +3492,22 @@ JS::Result<ParseNode*> BinASTParser<Tok>
     BINJS_TRY_VAR(result, handler_.newObjectLiteralPropertyName(
                               value, tokenizer_->pos(start)));
   }
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceLiteralRegExpExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::LiteralRegExpExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::LiteralRegExpExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Pattern,
-                                          BinASTField::Flags};
+  const BinField expected_fields[2] = {BinField::Pattern, BinField::Flags};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   RootedAtom pattern(cx_);
   MOZ_TRY_VAR(pattern, tokenizer_->readAtom());
   Chars flags(cx_);
   MOZ_TRY(tokenizer_->readChars(flags));
 
@@ -3546,109 +3534,108 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
   BINJS_TRY_DECL(result,
                  handler_.newRegExp(reobj, tokenizer_->pos(start), *this));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceLiteralStringExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::LiteralStringExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::LiteralStringExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Value};
+  const BinField expected_fields[1] = {BinField::Value};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   RootedAtom value(cx_);
   MOZ_TRY_VAR(value, tokenizer_->readAtom());
 
   BINJS_TRY_DECL(result,
                  handler_.newStringLiteral(value, tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceModule(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::NewExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::NewExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Callee,
-                                          BinASTField::Arguments};
+  const BinField expected_fields[2] = {BinField::Callee, BinField::Arguments};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(callee, parseExpression());
 
   BINJS_MOZ_TRY_DECL(arguments, parseArguments());
 
   BINJS_TRY_DECL(result, handler_.newNewExpression(tokenizer_->pos(start).begin,
                                                    callee, arguments));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceNewTargetExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::ObjectExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::ObjectExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Properties};
+  const BinField expected_fields[1] = {BinField::Properties};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(properties, parseListOfObjectProperty());
 
   auto result = properties;
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceReturnStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::ReturnStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::ReturnStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Expression};
+  const BinField expected_fields[1] = {BinField::Expression};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   if (!pc_->isFunctionBox()) {
     // Return statements are permitted only inside functions.
     return raiseInvalidKind("Toplevel Statement", kind);
   }
 
   pc_->functionBox()->usesReturn = true;
@@ -3657,23 +3644,23 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
   BINJS_TRY_DECL(
       result, handler_.newReturnStatement(expression, tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceScript(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::Script);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::Script);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[3] = {
-      BinASTField::Scope, BinASTField::Directives, BinASTField::Statements};
+  const BinField expected_fields[3] = {BinField::Scope, BinField::Directives,
+                                       BinField::Statements};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   MOZ_TRY(parseAssertedScriptGlobalScope());
 
   BINJS_MOZ_TRY_DECL(directives, parseListOfDirective());
   forceStrictIfNecessary(pc_->sc(), directives);
   BINJS_MOZ_TRY_DECL(statements, parseListOfStatement());
@@ -3692,44 +3679,44 @@ JS::Result<ParseNode*> BinASTParser<Tok>
     AssertedVarScope bodyScope;
     FunctionBody body;
  }
 */
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseSetterContents(uint32_t funLength,
                                                       ListNode** paramsOut,
                                                       ListNode** bodyOut) {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::SetterContents) {
+  if (kind != BinKind::SetterContents) {
     return raiseInvalidKind("SetterContents", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(
       result, parseInterfaceSetterContents(start, kind, fields, funLength,
                                            paramsOut, bodyOut));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseInterfaceSetterContents(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields,
+    const size_t start, const BinKind kind, const BinFields& fields,
     uint32_t funLength, ListNode** paramsOut, ListNode** bodyOut) {
-  MOZ_ASSERT(kind == BinASTKind::SetterContents);
+  MOZ_ASSERT(kind == BinKind::SetterContents);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[5] = {
-      BinASTField::IsThisCaptured, BinASTField::ParameterScope,
-      BinASTField::Param, BinASTField::BodyScope, BinASTField::Body};
+  const BinField expected_fields[5] = {
+      BinField::IsThisCaptured, BinField::ParameterScope, BinField::Param,
+      BinField::BodyScope, BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(isThisCaptured, tokenizer_->readBool());
   // TODO: Use this in BinASTParser::buildFunction.
   (void)isThisCaptured;
   Rooted<GCVector<JSAtom*>> positionalParams(cx_, GCVector<JSAtom*>(cx_));
   MOZ_TRY(parseAssertedParameterScope(&positionalParams));
@@ -3745,22 +3732,22 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
   *paramsOut = params;
   *bodyOut = body;
   auto result = Ok();
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceShorthandProperty(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::ShorthandProperty);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::ShorthandProperty);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Name};
+  const BinField expected_fields[1] = {BinField::Name};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(name, parseIdentifierExpression());
 
   MOZ_ASSERT(name->isKind(ParseNodeKind::Name));
   MOZ_ASSERT(!handler_.isUsableAsObjectPropertyName(name));
   BINJS_TRY_DECL(propName, handler_.newObjectLiteralPropertyName(
@@ -3769,31 +3756,30 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
   BINJS_TRY_DECL(result,
                  handler_.newShorthandPropertyDefinition(propName, name));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceSpreadElement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::StaticMemberAssignmentTarget);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::StaticMemberAssignmentTarget);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Object,
-                                          BinASTField::Property};
+  const BinField expected_fields[2] = {BinField::Object, BinField::Property};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   size_t nameStart;
 
   BINJS_MOZ_TRY_DECL(object, parseExpressionOrSuper());
   RootedAtom property(cx_);
   {
     nameStart = tokenizer_->offset();
@@ -3803,23 +3789,22 @@ BinASTParser<Tok>::parseInterfaceStaticM
   BINJS_TRY_DECL(name, handler_.newPropertyName(property->asPropertyName(),
                                                 tokenizer_->pos(nameStart)));
   BINJS_TRY_DECL(result, handler_.newPropertyAccess(object, name));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceStaticMemberExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::StaticMemberExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::StaticMemberExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Object,
-                                          BinASTField::Property};
+  const BinField expected_fields[2] = {BinField::Object, BinField::Property};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   size_t nameStart;
 
   BINJS_MOZ_TRY_DECL(object, parseExpressionOrSuper());
   RootedAtom property(cx_);
   {
     nameStart = tokenizer_->offset();
@@ -3829,53 +3814,52 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   BINJS_TRY_DECL(name, handler_.newPropertyName(property->asPropertyName(),
                                                 tokenizer_->pos(nameStart)));
   BINJS_TRY_DECL(result, handler_.newPropertyAccess(object, name));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceSuper(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   return raiseError(
       "FIXME: Not implemented yet in this preview release (Super)");
 }
 
 /*
  interface SwitchCase : Node {
     Expression test;
     FrozenArray<Statement> consequent;
  }
 */
 template <typename Tok>
 JS::Result<CaseClause*> BinASTParser<Tok>::parseSwitchCase() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::SwitchCase) {
+  if (kind != BinKind::SwitchCase) {
     return raiseInvalidKind("SwitchCase", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result, parseInterfaceSwitchCase(start, kind, fields));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<CaseClause*> BinASTParser<Tok>::parseInterfaceSwitchCase(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::SwitchCase);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::SwitchCase);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Test,
-                                          BinASTField::Consequent};
+  const BinField expected_fields[2] = {BinField::Test, BinField::Consequent};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(test, parseExpression());
 
   BINJS_MOZ_TRY_DECL(consequent, parseListOfStatement());
 
   BINJS_TRY_DECL(result, handler_.newCaseOrDefault(start, test, consequent));
@@ -3884,81 +3868,80 @@ JS::Result<CaseClause*> BinASTParser<Tok
 
 /*
  interface SwitchDefault : Node {
     FrozenArray<Statement> consequent;
  }
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseSwitchDefault() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::SwitchDefault) {
+  if (kind != BinKind::SwitchDefault) {
     return raiseInvalidKind("SwitchDefault", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result, parseInterfaceSwitchDefault(start, kind, fields));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceSwitchDefault(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::SwitchDefault);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::SwitchDefault);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Consequent};
+  const BinField expected_fields[1] = {BinField::Consequent};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(consequent, parseListOfStatement());
 
   BINJS_TRY_DECL(result, handler_.newCaseOrDefault(start, nullptr, consequent));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceSwitchStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::SwitchStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::SwitchStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Discriminant,
-                                          BinASTField::Cases};
+  const BinField expected_fields[2] = {BinField::Discriminant, BinField::Cases};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(discriminant, parseExpression());
   ParseContext::Statement stmt(pc_, StatementKind::Switch);
   BINJS_MOZ_TRY_DECL(cases, parseListOfSwitchCase());
 
   BINJS_TRY_DECL(scope, handler_.newLexicalScope(nullptr, cases));
   BINJS_TRY_DECL(result, handler_.newSwitchStatement(start, discriminant, scope,
                                                      /* hasDefault = */ false));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceSwitchStatementWithDefault(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::SwitchStatementWithDefault);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::SwitchStatementWithDefault);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[4] = {
-      BinASTField::Discriminant, BinASTField::PreDefaultCases,
-      BinASTField::DefaultCase, BinASTField::PostDefaultCases};
+  const BinField expected_fields[4] = {
+      BinField::Discriminant, BinField::PreDefaultCases, BinField::DefaultCase,
+      BinField::PostDefaultCases};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(discriminant, parseExpression());
   ParseContext::Statement stmt(pc_, StatementKind::Switch);
   BINJS_MOZ_TRY_DECL(preDefaultCases, parseListOfSwitchCase());
 
   BINJS_MOZ_TRY_DECL(defaultCase, parseSwitchDefault());
@@ -3977,26 +3960,26 @@ BinASTParser<Tok>::parseInterfaceSwitchS
   BINJS_TRY_DECL(scope, handler_.newLexicalScope(nullptr, cases));
   BINJS_TRY_DECL(result, handler_.newSwitchStatement(start, discriminant, scope,
                                                      /* hasDefault = */ true));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceTemplateExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::ThisExpression);
+    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));
 
   if (pc_->isFunctionBox()) {
     pc_->functionBox()->usesThis = true;
   }
 
   TokenPos pos = tokenizer_->pos(start);
@@ -4009,41 +3992,40 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   }
 
   BINJS_TRY_DECL(result, handler_.newThisLiteral(pos, thisName));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceThrowStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::ThrowStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::ThrowStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[1] = {BinASTField::Expression};
+  const BinField expected_fields[1] = {BinField::Expression};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(expression, parseExpression());
 
   BINJS_TRY_DECL(
       result, handler_.newThrowStatement(expression, tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceTryCatchStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::TryCatchStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::TryCatchStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Body,
-                                          BinASTField::CatchClause};
+  const BinField expected_fields[2] = {BinField::Body, BinField::CatchClause};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   ParseNode* body;
   {
     ParseContext::Statement stmt(pc_, StatementKind::Try);
     ParseContext::Scope scope(cx_, pc_, usedNames_);
     BINJS_TRY(scope.init(pc_));
     MOZ_TRY_VAR(body, parseBlock());
@@ -4054,23 +4036,23 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   BINJS_TRY_DECL(result,
                  handler_.newTryStatement(start, body, catchClause,
                                           /* finallyBlock = */ nullptr));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceTryFinallyStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::TryFinallyStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::TryFinallyStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[3] = {
-      BinASTField::Body, BinASTField::CatchClause, BinASTField::Finalizer};
+  const BinField expected_fields[3] = {BinField::Body, BinField::CatchClause,
+                                       BinField::Finalizer};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   ParseNode* body;
   {
     ParseContext::Statement stmt(pc_, StatementKind::Try);
     ParseContext::Scope scope(cx_, pc_, usedNames_);
     BINJS_TRY(scope.init(pc_));
     MOZ_TRY_VAR(body, parseBlock());
@@ -4087,23 +4069,22 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
   BINJS_TRY_DECL(result,
                  handler_.newTryStatement(start, body, catchClause, finalizer));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceUnaryExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::UnaryExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::UnaryExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Operator,
-                                          BinASTField::Operand};
+  const BinField expected_fields[2] = {BinField::Operator, BinField::Operand};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(operator_, parseUnaryOperator());
 
   BINJS_MOZ_TRY_DECL(operand, parseExpression());
 
   ParseNodeKind pnk;
@@ -4152,23 +4133,23 @@ JS::Result<ParseNode*> BinASTParser<Tok>
     }
   }
   BINJS_TRY_DECL(result, handler_.newUnary(pnk, start, operand));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceUpdateExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::UpdateExpression);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::UpdateExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[3] = {
-      BinASTField::IsPrefix, BinASTField::Operator, BinASTField::Operand};
+  const BinField expected_fields[3] = {BinField::IsPrefix, BinField::Operator,
+                                       BinField::Operand};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(isPrefix, tokenizer_->readBool());
 
   BINJS_MOZ_TRY_DECL(operator_, parseUpdateOperator());
 
   BINJS_MOZ_TRY_DECL(operand, parseSimpleAssignmentTarget());
@@ -4185,23 +4166,22 @@ JS::Result<ParseNode*> BinASTParser<Tok>
       break;
   }
   BINJS_TRY_DECL(result, handler_.newUnary(pnk, start, operand));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceVariableDeclaration(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::VariableDeclaration);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::VariableDeclaration);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Kind,
-                                          BinASTField::Declarators};
+  const BinField expected_fields[2] = {BinField::Kind, BinField::Declarators};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   AutoVariableDeclarationKind kindGuard(this);
 
   BINJS_MOZ_TRY_DECL(kind_, parseVariableDeclarationKind());
   // Restored by `kindGuard`.
   variableDeclarationKind_ = kind_;
   ParseNodeKind declarationListKind;
@@ -4229,41 +4209,40 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 /*
  interface VariableDeclarator : Node {
     Binding binding;
     Expression? init;
  }
 */
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseVariableDeclarator() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-  if (kind != BinASTKind::VariableDeclarator) {
+  if (kind != BinKind::VariableDeclarator) {
     return raiseInvalidKind("VariableDeclarator", kind);
   }
   const auto start = tokenizer_->offset();
   BINJS_MOZ_TRY_DECL(result,
                      parseInterfaceVariableDeclarator(start, kind, fields));
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceVariableDeclarator(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::VariableDeclarator);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::VariableDeclarator);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Binding,
-                                          BinASTField::Init};
+  const BinField expected_fields[2] = {BinField::Binding, BinField::Init};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(binding, parseBinding());
 
   BINJS_MOZ_TRY_DECL(init, parseOptionalExpression());
 
   ParseNode* result;
@@ -4277,80 +4256,79 @@ JS::Result<ParseNode*> BinASTParser<Tok>
     } else {
       result = bindingNameNode;
     }
   } else {
     // `var pattern = bar`
     if (!init) {
       // Here, `init` is required.
       return raiseMissingField("VariableDeclarator (with non-trivial pattern)",
-                               BinASTField::Init);
+                               BinField::Init);
     }
 
     MOZ_CRASH(
         "Unimplemented: AssertedScope check for BindingPattern variable "
         "declaration");
     BINJS_TRY_VAR(result, handler_.newAssignment(ParseNodeKind::AssignExpr,
                                                  binding, init));
   }
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceWhileStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::WhileStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::WhileStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Test, BinASTField::Body};
+  const BinField expected_fields[2] = {BinField::Test, BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   ParseContext::Statement stmt(pc_, StatementKind::WhileLoop);
 
   BINJS_MOZ_TRY_DECL(test, parseExpression());
 
   BINJS_MOZ_TRY_DECL(body, parseStatement());
 
   BINJS_TRY_DECL(result, handler_.newWhileStatement(start, test, body));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceWithStatement(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
-  MOZ_ASSERT(kind == BinASTKind::WithStatement);
+    const size_t start, const BinKind kind, const BinFields& fields) {
+  MOZ_ASSERT(kind == BinKind::WithStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
-  const BinASTField expected_fields[2] = {BinASTField::Object,
-                                          BinASTField::Body};
+  const BinField expected_fields[2] = {BinField::Object, BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(object, parseExpression());
 
   ParseContext::Statement stmt(pc_, StatementKind::With);
   BINJS_MOZ_TRY_DECL(body, parseStatement());
 
   pc_->sc()->setBindingsAccessedDynamically();
   BINJS_TRY_DECL(result, handler_.newWithStatement(start, object, body));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceYieldExpression(
-    const size_t start, const BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   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 BinASTKind kind, const BinASTFields& fields) {
+    const size_t start, const BinKind kind, const BinFields& fields) {
   return raiseError(
       "FIXME: Not implemented yet in this preview release "
       "(YieldStarExpression)");
 }
 
 // ----- String enums (autogenerated, by lexicographical order)
 /*
 enum AssertedDeclaredKind {
@@ -4360,21 +4338,21 @@ enum AssertedDeclaredKind {
 };
 */
 template <typename Tok>
 JS::Result<typename BinASTParser<Tok>::AssertedDeclaredKind>
 BinASTParser<Tok>::parseAssertedDeclaredKind() {
   BINJS_MOZ_TRY_DECL(variant, tokenizer_->readVariant());
 
   switch (variant) {
-    case BinASTVariant::AssertedDeclaredKindOrVariableDeclarationKindVar:
+    case BinVariant::AssertedDeclaredKindOrVariableDeclarationKindVar:
       return AssertedDeclaredKind::Var;
-    case BinASTVariant::AssertedDeclaredKindNonConstLexical:
+    case BinVariant::AssertedDeclaredKindNonConstLexical:
       return AssertedDeclaredKind::NonConstLexical;
-    case BinASTVariant::AssertedDeclaredKindConstLexical:
+    case BinVariant::AssertedDeclaredKindConstLexical:
       return AssertedDeclaredKind::ConstLexical;
     default:
       return raiseInvalidVariant("AssertedDeclaredKind", variant);
   }
 }
 
 /*
 enum BinaryOperator {
@@ -4406,65 +4384,65 @@ enum BinaryOperator {
 };
 */
 template <typename Tok>
 JS::Result<typename BinASTParser<Tok>::BinaryOperator>
 BinASTParser<Tok>::parseBinaryOperator() {
   BINJS_MOZ_TRY_DECL(variant, tokenizer_->readVariant());
 
   switch (variant) {
-    case BinASTVariant::BinaryOperatorComma:
+    case BinVariant::BinaryOperatorComma:
       return BinaryOperator::Comma;
-    case BinASTVariant::BinaryOperatorLogicalOr:
+    case BinVariant::BinaryOperatorLogicalOr:
       return BinaryOperator::LogicalOr;
-    case BinASTVariant::BinaryOperatorLogicalAnd:
+    case BinVariant::BinaryOperatorLogicalAnd:
       return BinaryOperator::LogicalAnd;
-    case BinASTVariant::BinaryOperatorBitOr:
+    case BinVariant::BinaryOperatorBitOr:
       return BinaryOperator::BitOr;
-    case BinASTVariant::BinaryOperatorBitXor:
+    case BinVariant::BinaryOperatorBitXor:
       return BinaryOperator::BitXor;
-    case BinASTVariant::BinaryOperatorBitAnd:
+    case BinVariant::BinaryOperatorBitAnd:
       return BinaryOperator::BitAnd;
-    case BinASTVariant::BinaryOperatorEq:
+    case BinVariant::BinaryOperatorEq:
       return BinaryOperator::Eq;
-    case BinASTVariant::BinaryOperatorNeq:
+    case BinVariant::BinaryOperatorNeq:
       return BinaryOperator::Neq;
-    case BinASTVariant::BinaryOperatorStrictEq:
+    case BinVariant::BinaryOperatorStrictEq:
       return BinaryOperator::StrictEq;
-    case BinASTVariant::BinaryOperatorStrictNeq:
+    case BinVariant::BinaryOperatorStrictNeq:
       return BinaryOperator::StrictNeq;
-    case BinASTVariant::BinaryOperatorLessThan:
+    case BinVariant::BinaryOperatorLessThan:
       return BinaryOperator::LessThan;
-    case BinASTVariant::BinaryOperatorLeqThan:
+    case BinVariant::BinaryOperatorLeqThan:
       return BinaryOperator::LeqThan;
-    case BinASTVariant::BinaryOperatorGreaterThan:
+    case BinVariant::BinaryOperatorGreaterThan:
       return BinaryOperator::GreaterThan;
-    case BinASTVariant::BinaryOperatorGeqThan:
+    case BinVariant::BinaryOperatorGeqThan:
       return BinaryOperator::GeqThan;
-    case BinASTVariant::BinaryOperatorIn:
+    case BinVariant::BinaryOperatorIn:
       return BinaryOperator::In;
-    case BinASTVariant::BinaryOperatorInstanceof:
+    case BinVariant::BinaryOperatorInstanceof:
       return BinaryOperator::Instanceof;
-    case BinASTVariant::BinaryOperatorLsh:
+    case BinVariant::BinaryOperatorLsh:
       return BinaryOperator::Lsh;
-    case BinASTVariant::BinaryOperatorRsh:
+    case BinVariant::BinaryOperatorRsh:
       return BinaryOperator::Rsh;
-    case BinASTVariant::BinaryOperatorUrsh:
+    case BinVariant::BinaryOperatorUrsh:
       return BinaryOperator::Ursh;
-    case BinASTVariant::BinaryOperatorOrUnaryOperatorPlus:
+    case BinVariant::BinaryOperatorOrUnaryOperatorPlus:
       return BinaryOperator::Plus;
-    case BinASTVariant::BinaryOperatorOrUnaryOperatorMinus:
+    case BinVariant::BinaryOperatorOrUnaryOperatorMinus:
       return BinaryOperator::Minus;
-    case BinASTVariant::BinaryOperatorMul:
+    case BinVariant::BinaryOperatorMul:
       return BinaryOperator::Mul;
-    case BinASTVariant::BinaryOperatorDiv:
+    case BinVariant::BinaryOperatorDiv:
       return BinaryOperator::Div;
-    case BinASTVariant::BinaryOperatorMod:
+    case BinVariant::BinaryOperatorMod:
       return BinaryOperator::Mod;
-    case BinASTVariant::BinaryOperatorPow:
+    case BinVariant::BinaryOperatorPow:
       return BinaryOperator::Pow;
     default:
       return raiseInvalidVariant("BinaryOperator", variant);
   }
 }
 
 /*
 enum CompoundAssignmentOperator {
@@ -4483,39 +4461,39 @@ enum CompoundAssignmentOperator {
 };
 */
 template <typename Tok>
 JS::Result<typename BinASTParser<Tok>::CompoundAssignmentOperator>
 BinASTParser<Tok>::parseCompoundAssignmentOperator() {
   BINJS_MOZ_TRY_DECL(variant, tokenizer_->readVariant());
 
   switch (variant) {
-    case BinASTVariant::CompoundAssignmentOperatorPlusAssign:
+    case BinVariant::CompoundAssignmentOperatorPlusAssign:
       return CompoundAssignmentOperator::PlusAssign;
-    case BinASTVariant::CompoundAssignmentOperatorMinusAssign:
+    case BinVariant::CompoundAssignmentOperatorMinusAssign:
       return CompoundAssignmentOperator::MinusAssign;
-    case BinASTVariant::CompoundAssignmentOperatorMulAssign:
+    case BinVariant::CompoundAssignmentOperatorMulAssign:
       return CompoundAssignmentOperator::MulAssign;
-    case BinASTVariant::CompoundAssignmentOperatorDivAssign:
+    case BinVariant::CompoundAssignmentOperatorDivAssign:
       return CompoundAssignmentOperator::DivAssign;
-    case BinASTVariant::CompoundAssignmentOperatorModAssign:
+    case BinVariant::CompoundAssignmentOperatorModAssign:
       return CompoundAssignmentOperator::ModAssign;
-    case BinASTVariant::CompoundAssignmentOperatorPowAssign:
+    case BinVariant::CompoundAssignmentOperatorPowAssign:
       return CompoundAssignmentOperator::PowAssign;
-    case BinASTVariant::CompoundAssignmentOperatorLshAssign:
+    case BinVariant::CompoundAssignmentOperatorLshAssign:
       return CompoundAssignmentOperator::LshAssign;
-    case BinASTVariant::CompoundAssignmentOperatorRshAssign:
+    case BinVariant::CompoundAssignmentOperatorRshAssign:
       return CompoundAssignmentOperator::RshAssign;
-    case BinASTVariant::CompoundAssignmentOperatorUrshAssign:
+    case BinVariant::CompoundAssignmentOperatorUrshAssign:
       return CompoundAssignmentOperator::UrshAssign;
-    case BinASTVariant::CompoundAssignmentOperatorBitOrAssign:
+    case BinVariant::CompoundAssignmentOperatorBitOrAssign:
       return CompoundAssignmentOperator::BitOrAssign;
-    case BinASTVariant::CompoundAssignmentOperatorBitXorAssign:
+    case BinVariant::CompoundAssignmentOperatorBitXorAssign:
       return CompoundAssignmentOperator::BitXorAssign;
-    case BinASTVariant::CompoundAssignmentOperatorBitAndAssign:
+    case BinVariant::CompoundAssignmentOperatorBitAndAssign:
       return CompoundAssignmentOperator::BitAndAssign;
     default:
       return raiseInvalidVariant("CompoundAssignmentOperator", variant);
   }
 }
 
 /*
 enum UnaryOperator {
@@ -4529,29 +4507,29 @@ enum UnaryOperator {
 };
 */
 template <typename Tok>
 JS::Result<typename BinASTParser<Tok>::UnaryOperator>
 BinASTParser<Tok>::parseUnaryOperator() {
   BINJS_MOZ_TRY_DECL(variant, tokenizer_->readVariant());
 
   switch (variant) {
-    case BinASTVariant::BinaryOperatorOrUnaryOperatorPlus:
+    case BinVariant::BinaryOperatorOrUnaryOperatorPlus:
       return UnaryOperator::Plus;
-    case BinASTVariant::BinaryOperatorOrUnaryOperatorMinus:
+    case BinVariant::BinaryOperatorOrUnaryOperatorMinus:
       return UnaryOperator::Minus;
-    case BinASTVariant::UnaryOperatorNot:
+    case BinVariant::UnaryOperatorNot:
       return UnaryOperator::Not;
-    case BinASTVariant::UnaryOperatorBitNot:
+    case BinVariant::UnaryOperatorBitNot:
       return UnaryOperator::BitNot;
-    case BinASTVariant::UnaryOperatorTypeof:
+    case BinVariant::UnaryOperatorTypeof:
       return UnaryOperator::Typeof;
-    case BinASTVariant::UnaryOperatorVoid:
+    case BinVariant::UnaryOperatorVoid:
       return UnaryOperator::Void;
-    case BinASTVariant::UnaryOperatorDelete:
+    case BinVariant::UnaryOperatorDelete:
       return UnaryOperator::Delete;
     default:
       return raiseInvalidVariant("UnaryOperator", variant);
   }
 }
 
 /*
 enum UpdateOperator {
@@ -4560,19 +4538,19 @@ enum UpdateOperator {
 };
 */
 template <typename Tok>
 JS::Result<typename BinASTParser<Tok>::UpdateOperator>
 BinASTParser<Tok>::parseUpdateOperator() {
   BINJS_MOZ_TRY_DECL(variant, tokenizer_->readVariant());
 
   switch (variant) {
-    case BinASTVariant::UpdateOperatorIncr:
+    case BinVariant::UpdateOperatorIncr:
       return UpdateOperator::Incr;
-    case BinASTVariant::UpdateOperatorDecr:
+    case BinVariant::UpdateOperatorDecr:
       return UpdateOperator::Decr;
     default:
       return raiseInvalidVariant("UpdateOperator", variant);
   }
 }
 
 /*
 enum VariableDeclarationKind {
@@ -4582,21 +4560,21 @@ enum VariableDeclarationKind {
 };
 */
 template <typename Tok>
 JS::Result<typename BinASTParser<Tok>::VariableDeclarationKind>
 BinASTParser<Tok>::parseVariableDeclarationKind() {
   BINJS_MOZ_TRY_DECL(variant, tokenizer_->readVariant());
 
   switch (variant) {
-    case BinASTVariant::AssertedDeclaredKindOrVariableDeclarationKindVar:
+    case BinVariant::AssertedDeclaredKindOrVariableDeclarationKindVar:
       return VariableDeclarationKind::Var;
-    case BinASTVariant::VariableDeclarationKindLet:
+    case BinVariant::VariableDeclarationKindLet:
       return VariableDeclarationKind::Let;
-    case BinASTVariant::VariableDeclarationKindConst:
+    case BinVariant::VariableDeclarationKindConst:
       return VariableDeclarationKind::Const;
     default:
       return raiseInvalidVariant("VariableDeclarationKind", variant);
   }
 }
 
 // ----- Lists (autogenerated, by lexicographical order)
 
@@ -4840,153 +4818,153 @@ JS::Result<ListNode*> BinASTParser<Tok>:
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 // ----- Default values (by lexicographical order)
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseOptionalBinding() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
   ParseNode* result;
-  if (kind == BinASTKind::_Null) {
+  if (kind == BinKind::_Null) {
     result = nullptr;
   } else {
     const auto start = tokenizer_->offset();
     MOZ_TRY_VAR(result, parseSumBinding(start, kind, fields));
   }
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseOptionalBindingIdentifier() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
   ParseNode* result;
-  if (kind == BinASTKind::_Null) {
+  if (kind == BinKind::_Null) {
     result = nullptr;
-  } else if (kind == BinASTKind::BindingIdentifier) {
+  } else if (kind == BinKind::BindingIdentifier) {
     const auto start = tokenizer_->offset();
     MOZ_TRY_VAR(result, parseInterfaceBindingIdentifier(start, kind, fields));
   } else {
     return raiseInvalidKind("BindingIdentifier", kind);
   }
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<LexicalScopeNode*> BinASTParser<Tok>::parseOptionalCatchClause() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
   LexicalScopeNode* result;
-  if (kind == BinASTKind::_Null) {
+  if (kind == BinKind::_Null) {
     result = nullptr;
-  } else if (kind == BinASTKind::CatchClause) {
+  } else if (kind == BinKind::CatchClause) {
     const auto start = tokenizer_->offset();
     MOZ_TRY_VAR(result, parseInterfaceCatchClause(start, kind, fields));
   } else {
     return raiseInvalidKind("CatchClause", kind);
   }
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseOptionalExpression() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
   ParseNode* result;
-  if (kind == BinASTKind::_Null) {
+  if (kind == BinKind::_Null) {
     result = nullptr;
   } else {
     const auto start = tokenizer_->offset();
     MOZ_TRY_VAR(result, parseSumExpression(start, kind, fields));
   }
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseOptionalSpreadElementOrExpression() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
   ParseNode* result;
-  if (kind == BinASTKind::_Null) {
+  if (kind == BinKind::_Null) {
     result = nullptr;
   } else {
     const auto start = tokenizer_->offset();
     MOZ_TRY_VAR(result, parseSumSpreadElementOrExpression(start, kind, fields));
   }
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseOptionalStatement() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
   ParseNode* result;
-  if (kind == BinASTKind::_Null) {
+  if (kind == BinKind::_Null) {
     result = nullptr;
   } else {
     const auto start = tokenizer_->offset();
     MOZ_TRY_VAR(result, parseSumStatement(start, kind, fields));
   }
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseOptionalVariableDeclarationOrExpression() {
-  BinASTKind kind;
-  BinASTFields fields(cx_);
+  BinKind kind;
+  BinFields fields(cx_);
   AutoTaggedTuple guard(*tokenizer_);
 
   MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
   ParseNode* result;
-  if (kind == BinASTKind::_Null) {
+  if (kind == BinKind::_Null) {
     result = nullptr;
   } else {
     const auto start = tokenizer_->offset();
     MOZ_TRY_VAR(result,
                 parseSumVariableDeclarationOrExpression(start, kind, fields));
   }
   MOZ_TRY(guard.done());
 
   return result;
 }
 
 // Force class instantiation.
 // This ensures that the symbols are built, without having to export all our
 // code (and its baggage of #include and macros) in the header.
-template class BinASTParser<BinASTTokenReaderMultipart>;
+template class BinASTParser<BinTokenReaderMultipart>;
 
 }  // namespace frontend
 }  // namespace js
--- a/js/src/frontend/BinASTParser.h
+++ b/js/src/frontend/BinASTParser.h
@@ -2,27 +2,27 @@
 // please DO NOT EDIT BY HAND.
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // To generate this file, see the documentation in
-// js/src/frontend/binast/README.md.
+// js/src/frontend/binsource/README.md.
 
 #ifndef frontend_BinASTParser_h
 #define frontend_BinASTParser_h
 
 #include "mozilla/Maybe.h"
 
 #include "frontend/BCEParserHandle.h"
 #include "frontend/BinASTParserPerTokenizer.h"
-#include "frontend/BinASTToken.h"
-#include "frontend/BinASTTokenReaderMultipart.h"
+#include "frontend/BinToken.h"
+#include "frontend/BinTokenReaderMultipart.h"
 #include "frontend/FullParseHandler.h"
 #include "frontend/ParseContext.h"
 #include "frontend/ParseNode.h"
 #include "frontend/SharedContext.h"
 
 #include "js/CompileOptions.h"
 #include "js/GCHashTable.h"
 #include "js/GCVector.h"
@@ -33,17 +33,17 @@ namespace frontend {
 
 template <typename Tok>
 class BinASTParser : public BinASTParserPerTokenizer<Tok> {
  public:
   using Base = BinASTParserPerTokenizer<Tok>;
 
   using Tokenizer = Tok;
 
-  using BinASTFields = typename Tokenizer::BinASTFields;
+  using BinFields = typename Tokenizer::BinFields;
   using AutoList = typename Tokenizer::AutoList;
   using AutoTaggedTuple = typename Tokenizer::AutoTaggedTuple;
   using Chars = typename Tokenizer::Chars;
 
  public:
   // Auto-generated types.
   using AssertedDeclaredKind = binast::AssertedDeclaredKind;
   using BinaryOperator = binast::BinaryOperator;
@@ -130,54 +130,52 @@ class BinASTParser : public BinASTParser
   JS::Result<ParseNode*> parseObjectProperty();
   JS::Result<ParseNode*> parseParameter();
   JS::Result<ParseNode*> parseProgram();
   JS::Result<ParseNode*> parsePropertyName();
   JS::Result<ParseNode*> parseSimpleAssignmentTarget();
   JS::Result<ParseNode*> parseSpreadElementOrExpression();
   JS::Result<ParseNode*> parseStatement();
   JS::Result<Ok> parseSumAssertedMaybePositionalParameterName(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields,
+      const size_t start, const BinKind kind, const BinFields& fields,
       AssertedScopeKind scopeKind,
       MutableHandle<GCVector<JSAtom*>> positionalParams);
   JS::Result<ParseNode*> parseSumAssignmentTarget(const size_t start,
-                                                  const BinASTKind kind,
-                                                  const BinASTFields& fields);
-  JS::Result<ParseNode*> parseSumBinding(const size_t start,
-                                         const BinASTKind kind,
-                                         const BinASTFields& fields);
+                                                  const BinKind kind,
+                                                  const BinFields& fields);
+  JS::Result<ParseNode*> parseSumBinding(const size_t start, const BinKind kind,
+                                         const BinFields& fields);
   JS::Result<ParseNode*> parseSumExpression(const size_t start,
-                                            const BinASTKind kind,
-                                            const BinASTFields& fields);
+                                            const BinKind kind,
+                                            const BinFields& fields);
   JS::Result<ParseNode*> parseSumExpressionOrSuper(const size_t start,
-                                                   const BinASTKind kind,
-                                                   const BinASTFields& fields);
+                                                   const BinKind kind,
+                                                   const BinFields& fields);
   JS::Result<ParseNode*> parseSumForInOfBindingOrAssignmentTarget(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseSumObjectProperty(const size_t start,
-                                                const BinASTKind kind,
-                                                const BinASTFields& fields);
+                                                const BinKind kind,
+                                                const BinFields& fields);
   JS::Result<ParseNode*> parseSumParameter(const size_t start,
-                                           const BinASTKind kind,
-                                           const BinASTFields& fields);
-  JS::Result<ParseNode*> parseSumProgram(const size_t start,
-                                         const BinASTKind kind,
-                                         const BinASTFields& fields);
+                                           const BinKind kind,
+                                           const BinFields& fields);
+  JS::Result<ParseNode*> parseSumProgram(const size_t start, const BinKind kind,
+                                         const BinFields& fields);
   JS::Result<ParseNode*> parseSumPropertyName(const size_t start,
-                                              const BinASTKind kind,
-                                              const BinASTFields& fields);
+                                              const BinKind kind,
+                                              const BinFields& fields);
   JS::Result<ParseNode*> parseSumSimpleAssignmentTarget(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseSumSpreadElementOrExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseSumStatement(const size_t start,
-                                           const BinASTKind kind,
-                                           const BinASTFields& fields);
+                                           const BinKind kind,
+                                           const BinFields& fields);
   JS::Result<ParseNode*> parseSumVariableDeclarationOrExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
 
   // ----- Interfaces (by lexicographical order)
   // `ParseNode*` may never be nullptr
   JS::Result<Ok> parseAssertedBlockScope();
   JS::Result<Ok> parseAssertedBoundName(AssertedScopeKind scopeKind);
   JS::Result<Ok> parseAssertedBoundNamesScope();
   JS::Result<Ok> parseAssertedDeclaredName(AssertedScopeKind scopeKind);
   JS::Result<Ok> parseAssertedParameterScope(
@@ -199,239 +197,262 @@ class BinASTParser : public BinASTParser
                                      ListNode** bodyOut);
   JS::Result<ParseNode*> parseIdentifierExpression();
   JS::Result<Ok> parseSetterContents(uint32_t funLength, ListNode** paramsOut,
                                      ListNode** bodyOut);
   JS::Result<CaseClause*> parseSwitchCase();
   JS::Result<ParseNode*> parseSwitchDefault();
   JS::Result<ParseNode*> parseVariableDeclarator();
   JS::Result<ParseNode*> parseInterfaceArrayAssignmentTarget(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceArrayBinding(const size_t start,
-                                                    const BinASTKind kind,
-                                                    const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceArrayExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+                                                    const BinKind kind,
+                                                    const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceArrayExpression(const size_t start,
+                                                       const BinKind kind,
+                                                       const BinFields& fields);
   JS::Result<Ok> parseInterfaceAssertedBlockScope(const size_t start,
-                                                  const BinASTKind kind,
-                                                  const BinASTFields& fields);
+                                                  const BinKind kind,
+                                                  const BinFields& fields);
   JS::Result<Ok> parseInterfaceAssertedBoundName(const size_t start,
-                                                 const BinASTKind kind,
-                                                 const BinASTFields& fields,
+                                                 const BinKind kind,
+                                                 const BinFields& fields,
                                                  AssertedScopeKind scopeKind);
-  JS::Result<Ok> parseInterfaceAssertedBoundNamesScope(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+  JS::Result<Ok> parseInterfaceAssertedBoundNamesScope(const size_t start,
+                                                       const BinKind kind,
+                                                       const BinFields& fields);
   JS::Result<Ok> parseInterfaceAssertedDeclaredName(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields,
+      const size_t start, const BinKind kind, const BinFields& fields,
       AssertedScopeKind scopeKind);
   JS::Result<Ok> parseInterfaceAssertedParameterScope(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields,
+      const size_t start, const BinKind kind, const BinFields& fields,
       MutableHandle<GCVector<JSAtom*>> positionalParams);
   JS::Result<Ok> parseInterfaceAssertedPositionalParameterName(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields,
+      const size_t start, const BinKind kind, const BinFields& fields,
       AssertedScopeKind scopeKind,
       MutableHandle<GCVector<JSAtom*>> positionalParams);
   JS::Result<Ok> parseInterfaceAssertedScriptGlobalScope(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<Ok> parseInterfaceAssertedVarScope(const size_t start,
-                                                const BinASTKind kind,
-                                                const BinASTFields& fields);
+                                                const BinKind kind,
+                                                const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceAssignmentExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceAssignmentTargetIdentifier(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceAwaitExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceAwaitExpression(const size_t start,
+                                                       const BinKind kind,
+                                                       const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceBinaryExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceBindingIdentifier(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceBindingWithInitializer(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceBlock(const size_t start,
-                                             const BinASTKind kind,
-                                             const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceBreakStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceCallExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+                                             const BinKind kind,
+                                             const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceBreakStatement(const size_t start,
+                                                      const BinKind kind,
+                                                      const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceCallExpression(const size_t start,
+                                                      const BinKind kind,
+                                                      const BinFields& fields);
   JS::Result<LexicalScopeNode*> parseInterfaceCatchClause(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceClassDeclaration(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceClassExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceClassExpression(const size_t start,
+                                                       const BinKind kind,
+                                                       const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceCompoundAssignmentExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceComputedMemberAssignmentTarget(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceComputedMemberExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceComputedPropertyName(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceConditionalExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceContinueStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceDataProperty(const size_t start,
-                                                    const BinASTKind kind,
-                                                    const BinASTFields& fields);
+                                                    const BinKind kind,
+                                                    const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceDebuggerStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceDirective(const size_t start,
-                                                 const BinASTKind kind,
-                                                 const BinASTFields& fields);
+                                                 const BinKind kind,
+                                                 const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceDoWhileStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceEagerArrowExpressionWithExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceEagerArrowExpressionWithFunctionBody(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceEagerFunctionDeclaration(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceEagerFunctionExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceEagerGetter(const size_t start,
-                                                   const BinASTKind kind,
-                                                   const BinASTFields& fields);
+                                                   const BinKind kind,
+                                                   const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceEagerMethod(const size_t start,
-                                                   const BinASTKind kind,
-                                                   const BinASTFields& fields);
+                                                   const BinKind kind,
+                                                   const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceEagerSetter(const size_t start,
-                                                   const BinASTKind kind,
-                                                   const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceEmptyStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+                                                   const BinKind kind,
+                                                   const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceEmptyStatement(const size_t start,
+                                                      const BinKind kind,
+                                                      const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceExpressionStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceForInOfBinding(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceForInStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceForOfStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceForInOfBinding(const size_t start,
+                                                      const BinKind kind,
+                                                      const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceForInStatement(const size_t start,
+                                                      const BinKind kind,
+                                                      const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceForOfStatement(const size_t start,
+                                                      const BinKind kind,
+                                                      const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceForStatement(const size_t start,
-                                                    const BinASTKind kind,
-                                                    const BinASTFields& fields);
-  JS::Result<ListNode*> parseInterfaceFormalParameters(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+                                                    const BinKind kind,
+                                                    const BinFields& fields);
+  JS::Result<ListNode*> parseInterfaceFormalParameters(const size_t start,
+                                                       const BinKind kind,
+                                                       const BinFields& fields);
   JS::Result<Ok> parseInterfaceFunctionExpressionContents(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields,
+      const size_t start, const BinKind kind, const BinFields& fields,
       uint32_t funLength, ListNode** paramsOut, ListNode** bodyOut);
   JS::Result<Ok> parseInterfaceFunctionOrMethodContents(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields,
+      const size_t start, const BinKind kind, const BinFields& fields,
       uint32_t funLength, ListNode** paramsOut, ListNode** bodyOut);
   JS::Result<Ok> parseInterfaceGetterContents(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields,
+      const size_t start, const BinKind kind, const BinFields& fields,
       uint32_t funLength, ListNode** paramsOut, ListNode** bodyOut);
   JS::Result<ParseNode*> parseInterfaceIdentifierExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceIfStatement(const size_t start,
-                                                   const BinASTKind kind,
-                                                   const BinASTFields& fields);
+                                                   const BinKind kind,
+                                                   const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLabelledStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLazyArrowExpressionWithExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLazyArrowExpressionWithFunctionBody(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLazyFunctionDeclaration(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLazyFunctionExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLazyGetter(const size_t start,
-                                                  const BinASTKind kind,
-                                                  const BinASTFields& fields);
+                                                  const BinKind kind,
+                                                  const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLazyMethod(const size_t start,
-                                                  const BinASTKind kind,
-                                                  const BinASTFields& fields);
+                                                  const BinKind kind,
+                                                  const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLazySetter(const size_t start,
-                                                  const BinASTKind kind,
-                                                  const BinASTFields& fields);
+                                                  const BinKind kind,
+                                                  const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLiteralBooleanExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLiteralInfinityExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLiteralNullExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLiteralNumericExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLiteralPropertyName(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLiteralRegExpExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceLiteralStringExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceModule(const size_t start,
-                                              const BinASTKind kind,
-                                              const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceNewExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+                                              const BinKind kind,
+                                              const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceNewExpression(const size_t start,
+                                                     const BinKind kind,
+                                                     const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceNewTargetExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceObjectAssignmentTarget(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceObjectBinding(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceObjectBinding(const size_t start,
+                                                     const BinKind kind,
+                                                     const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceObjectExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceReturnStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceReturnStatement(const size_t start,
+                                                       const BinKind kind,
+                                                       const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceScript(const size_t start,
-                                              const BinASTKind kind,
-                                              const BinASTFields& fields);
+                                              const BinKind kind,
+                                              const BinFields& fields);
   JS::Result<Ok> parseInterfaceSetterContents(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields,
+      const size_t start, const BinKind kind, const BinFields& fields,
       uint32_t funLength, ListNode** paramsOut, ListNode** bodyOut);
   JS::Result<ParseNode*> parseInterfaceShorthandProperty(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceSpreadElement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceSpreadElement(const size_t start,
+                                                     const BinKind kind,
+                                                     const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceStaticMemberAssignmentTarget(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceStaticMemberExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceSuper(const size_t start,
-                                             const BinASTKind kind,
-                                             const BinASTFields& fields);
+                                             const BinKind kind,
+                                             const BinFields& fields);
   JS::Result<CaseClause*> parseInterfaceSwitchCase(const size_t start,
-                                                   const BinASTKind kind,
-                                                   const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceSwitchDefault(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceSwitchStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+                                                   const BinKind kind,
+                                                   const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceSwitchDefault(const size_t start,
+                                                     const BinKind kind,
+                                                     const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceSwitchStatement(const size_t start,
+                                                       const BinKind kind,
+                                                       const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceSwitchStatementWithDefault(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceTemplateExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceThisExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceThrowStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceThisExpression(const size_t start,
+                                                      const BinKind kind,
+                                                      const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceThrowStatement(const size_t start,
+                                                      const BinKind kind,
+                                                      const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceTryCatchStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceTryFinallyStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceUnaryExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceUnaryExpression(const size_t start,
+                                                       const BinKind kind,
+                                                       const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceUpdateExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceVariableDeclaration(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceVariableDeclarator(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceWhileStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceWithStatement(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
-  JS::Result<ParseNode*> parseInterfaceYieldExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceWhileStatement(const size_t start,
+                                                      const BinKind kind,
+                                                      const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceWithStatement(const size_t start,
+                                                     const BinKind kind,
+                                                     const BinFields& fields);
+  JS::Result<ParseNode*> parseInterfaceYieldExpression(const size_t start,
+                                                       const BinKind kind,
+                                                       const BinFields& fields);
   JS::Result<ParseNode*> parseInterfaceYieldStarExpression(
-      const size_t start, const BinASTKind kind, const BinASTFields& fields);
+      const size_t start, const BinKind kind, const BinFields& fields);
 
   // ----- String enums (by lexicographical order)
   JS::Result<typename BinASTParser<Tok>::AssertedDeclaredKind>
   parseAssertedDeclaredKind();
   JS::Result<typename BinASTParser<Tok>::BinaryOperator> parseBinaryOperator();
   JS::Result<typename BinASTParser<Tok>::CompoundAssignmentOperator>
   parseCompoundAssignmentOperator();
   JS::Result<typename BinASTParser<Tok>::UnaryOperator> parseUnaryOperator();
@@ -461,14 +482,14 @@ class BinASTParser : public BinASTParser
   JS::Result<ParseNode*> parseOptionalBindingIdentifier();
   JS::Result<LexicalScopeNode*> parseOptionalCatchClause();
   JS::Result<ParseNode*> parseOptionalExpression();
   JS::Result<ParseNode*> parseOptionalSpreadElementOrExpression();
   JS::Result<ParseNode*> parseOptionalStatement();
   JS::Result<ParseNode*> parseOptionalVariableDeclarationOrExpression();
 };
 
-extern template class BinASTParser<BinASTTokenReaderMultipart>;
+extern template class BinASTParser<BinTokenReaderMultipart>;
 
 }  // namespace frontend
 }  // namespace js
 
 #endif  // frontend_BinASTParser_h
--- a/js/src/frontend/BinASTParserPerTokenizer.cpp
+++ b/js/src/frontend/BinASTParserPerTokenizer.cpp
@@ -9,19 +9,19 @@
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Casting.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/Move.h"
 #include "mozilla/PodOperations.h"
 #include "mozilla/ScopeExit.h"
 #include "mozilla/Vector.h"
 
-#include "frontend/BinAST-macros.h"
 #include "frontend/BinASTParser.h"
-#include "frontend/BinASTTokenReaderMultipart.h"
+#include "frontend/BinSource-macros.h"
+#include "frontend/BinTokenReaderMultipart.h"
 #include "frontend/FullParseHandler.h"
 #include "frontend/ParseNode.h"
 #include "frontend/Parser.h"
 #include "frontend/SharedContext.h"
 
 #include "js/Result.h"
 #include "vm/RegExpObject.h"
 
@@ -113,18 +113,17 @@ JS::Result<ParseNode*> BinASTParserPerTo
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParserPerTokenizer<Tok>::parseAux(
     GlobalSharedContext* globalsc, const uint8_t* start, const size_t length,
     BinASTSourceMetadata** metadataPtr) {
   MOZ_ASSERT(globalsc);
 
   tokenizer_.emplace(cx_, this, start, length);
 
-  BinASTParseContext globalpc(cx_, this, globalsc,
-                              /* newDirectives = */ nullptr);
+  BinParseContext globalpc(cx_, this, globalsc, /* newDirectives = */ nullptr);
   if (!globalpc.init()) {
     return cx_->alreadyReportedError();
   }
 
   ParseContext::VarScope varScope(cx_, &globalpc, usedNames_);
   if (!varScope.init(&globalpc)) {
     return cx_->alreadyReportedError();
   }
@@ -175,36 +174,36 @@ JS::Result<FunctionNode*> BinASTParserPe
   auto syntaxKind =
       isExpr ? FunctionSyntaxKind::Expression : FunctionSyntaxKind::Statement;
   BINJS_MOZ_TRY_DECL(
       funbox, buildFunctionBox(lazyScript_->generatorKind(),
                                lazyScript_->asyncKind(), syntaxKind, nullptr));
 
   // Push a new ParseContext. It will be used to parse `scope`, the arguments,
   // the function.
-  BinASTParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
+  BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
   BINJS_TRY(funpc.init());
   pc_->functionScope().useAsVarScope(pc_);
   MOZ_ASSERT(pc_->isFunctionBox());
 
   ParseContext::Scope lexicalScope(cx_, pc_, usedNames_);
   BINJS_TRY(lexicalScope.init(pc_));
   ListNode* params;
   ListNode* tmpBody;
   auto parseFunc = isExpr ? &FinalParser::parseFunctionExpressionContents
                           : &FinalParser::parseFunctionOrMethodContents;
   MOZ_TRY((asFinalParser()->*parseFunc)(func->nargs(), &params, &tmpBody));
 
   BINJS_TRY_DECL(lexicalScopeData,
                  NewLexicalScopeData(cx_, lexicalScope, alloc_, pc_));
   BINJS_TRY_DECL(body, handler_.newLexicalScope(*lexicalScopeData, tmpBody));
 
-  auto binASTKind = isExpr ? BinASTKind::LazyFunctionExpression
-                           : BinASTKind::LazyFunctionDeclaration;
-  return buildFunction(firstOffset, binASTKind, nullptr, params, body);
+  auto binKind = isExpr ? BinKind::LazyFunctionExpression
+                        : BinKind::LazyFunctionDeclaration;
+  return buildFunction(firstOffset, binKind, nullptr, params, body);
 }
 
 template <typename Tok>
 void BinASTParserPerTokenizer<Tok>::forceStrictIfNecessary(
     SharedContext* sc, ListNode* directives) {
   JSAtom* useStrict = cx_->names().useStrict;
 
   for (const ParseNode* directive : directives->contents()) {
@@ -270,63 +269,63 @@ JS::Result<FunctionBox*> BinASTParserPer
   if (pc_) {
     funbox->initWithEnclosingParseContext(pc_, syntax);
   } else {
     funbox->initFromLazyFunction();
   }
   return funbox;
 }
 
-FunctionSyntaxKind BinASTKindToFunctionSyntaxKind(const BinASTKind kind) {
+FunctionSyntaxKind BinKindToFunctionSyntaxKind(const BinKind kind) {
   // FIXME: this doesn't cover FunctionSyntaxKind::ClassConstructor and
   // FunctionSyntaxKind::DerivedClassConstructor.
   switch (kind) {
-    case BinASTKind::EagerFunctionDeclaration:
-    case BinASTKind::LazyFunctionDeclaration:
+    case BinKind::EagerFunctionDeclaration:
+    case BinKind::LazyFunctionDeclaration:
       return FunctionSyntaxKind::Statement;
-    case BinASTKind::EagerFunctionExpression:
-    case BinASTKind::LazyFunctionExpression:
+    case BinKind::EagerFunctionExpression:
+    case BinKind::LazyFunctionExpression:
       return FunctionSyntaxKind::Expression;
-    case BinASTKind::EagerArrowExpressionWithFunctionBody:
-    case BinASTKind::LazyArrowExpressionWithFunctionBody:
-    case BinASTKind::EagerArrowExpressionWithExpression:
-    case BinASTKind::LazyArrowExpressionWithExpression:
+    case BinKind::EagerArrowExpressionWithFunctionBody:
+    case BinKind::LazyArrowExpressionWithFunctionBody:
+    case BinKind::EagerArrowExpressionWithExpression:
+    case BinKind::LazyArrowExpressionWithExpression:
       return FunctionSyntaxKind::Arrow;
-    case BinASTKind::EagerMethod:
-    case BinASTKind::LazyMethod:
+    case BinKind::EagerMethod:
+    case BinKind::LazyMethod:
       return FunctionSyntaxKind::Method;
-    case BinASTKind::EagerGetter:
-    case BinASTKind::LazyGetter:
+    case BinKind::EagerGetter:
+    case BinKind::LazyGetter:
       return FunctionSyntaxKind::Getter;
-    case BinASTKind::EagerSetter:
-    case BinASTKind::LazySetter:
+    case BinKind::EagerSetter:
+    case BinKind::LazySetter:
       return FunctionSyntaxKind::Setter;
     default:
       MOZ_CRASH("Invalid/ kind");
   }
 }
 
 template <typename Tok>
 JS::Result<FunctionNode*> BinASTParserPerTokenizer<Tok>::makeEmptyFunctionNode(
-    const size_t start, const BinASTKind kind, FunctionBox* funbox) {
+    const size_t start, const BinKind kind, FunctionBox* funbox) {
   // LazyScript compilation requires basically none of the fields filled out.
   TokenPos pos = tokenizer_->pos(start);
-  FunctionSyntaxKind syntaxKind = BinASTKindToFunctionSyntaxKind(kind);
+  FunctionSyntaxKind syntaxKind = BinKindToFunctionSyntaxKind(kind);
 
   BINJS_TRY_DECL(result, handler_.newFunction(syntaxKind, pos));
 
   handler_.setFunctionBox(result, funbox);
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<FunctionNode*> BinASTParserPerTokenizer<Tok>::buildFunction(
-    const size_t start, const BinASTKind kind, ParseNode* name,
-    ListNode* params, ParseNode* body) {
+    const size_t start, const BinKind kind, ParseNode* name, ListNode* params,
+    ParseNode* body) {
   FunctionBox* funbox = pc_->functionBox();
 
   // Set the argument count for building argument packets. Function.length is
   // handled by setting the appropriate funbox field during argument parsing.
   if (!lazyScript_ ||
       lazyScript_->functionNonDelazifying() != funbox->function()) {
     funbox->function()->setArgCount(params ? uint16_t(params->count()) : 0);
   }
@@ -678,44 +677,44 @@ template <typename Tok>
 mozilla::GenericErrorResult<JS::Error&>
 BinASTParserPerTokenizer<Tok>::raiseMissingDirectEvalInAssertedScope() {
   return raiseError("Direct call to `eval` was not declared in AssertedScope");
 }
 
 template <typename Tok>
 mozilla::GenericErrorResult<JS::Error&>
 BinASTParserPerTokenizer<Tok>::raiseInvalidKind(const char* superKind,
-                                                const BinASTKind kind) {
+                                                const BinKind kind) {
   Sprinter out(cx_);
   BINJS_TRY(out.init());
-  BINJS_TRY(out.printf("In %s, invalid kind %s", superKind,
-                       describeBinASTKind(kind)));
+  BINJS_TRY(
+      out.printf("In %s, invalid kind %s", superKind, describeBinKind(kind)));
   return raiseError(out.string());
 }
 
 template <typename Tok>
 mozilla::GenericErrorResult<JS::Error&>
 BinASTParserPerTokenizer<Tok>::raiseInvalidVariant(const char* kind,
-                                                   const BinASTVariant value) {
+                                                   const BinVariant value) {
   Sprinter out(cx_);
   BINJS_TRY(out.init());
   BINJS_TRY(out.printf("In %s, invalid variant '%s'", kind,
-                       describeBinASTVariant(value)));
+                       describeBinVariant(value)));
 
   return raiseError(out.string());
 }
 
 template <typename Tok>
 mozilla::GenericErrorResult<JS::Error&>
 BinASTParserPerTokenizer<Tok>::raiseMissingField(const char* kind,
-                                                 const BinASTField field) {
+                                                 const BinField field) {
   Sprinter out(cx_);
   BINJS_TRY(out.init());
-  BINJS_TRY(out.printf("In %s, missing field '%s'", kind,
-                       describeBinASTField(field)));
+  BINJS_TRY(
+      out.printf("In %s, missing field '%s'", kind, describeBinField(field)));
 
   return raiseError(out.string());
 }
 
 template <typename Tok>
 mozilla::GenericErrorResult<JS::Error&>
 BinASTParserPerTokenizer<Tok>::raiseEmpty(const char* description) {
   Sprinter out(cx_);
@@ -728,21 +727,21 @@ BinASTParserPerTokenizer<Tok>::raiseEmpt
 template <typename Tok>
 mozilla::GenericErrorResult<JS::Error&>
 BinASTParserPerTokenizer<Tok>::raiseOOM() {
   return tokenizer_->raiseOOM();
 }
 
 template <typename Tok>
 mozilla::GenericErrorResult<JS::Error&>
-BinASTParserPerTokenizer<Tok>::raiseError(BinASTKind kind,
+BinASTParserPerTokenizer<Tok>::raiseError(BinKind kind,
                                           const char* description) {
   Sprinter out(cx_);
   BINJS_TRY(out.init());
-  BINJS_TRY(out.printf("In %s, %s", describeBinASTKind(kind), description));
+  BINJS_TRY(out.printf("In %s, %s", describeBinKind(kind), description));
   return tokenizer_->raiseError(out.string());
 }
 
 template <typename Tok>
 mozilla::GenericErrorResult<JS::Error&>
 BinASTParserPerTokenizer<Tok>::raiseError(const char* description) {
   return tokenizer_->raiseError(description);
 }
@@ -801,12 +800,12 @@ BinASTParserPerTokenizer<Tok>::asFinalPa
       "inheritance relationship required by the static_cast<> below");
 
   return static_cast<const FinalParser*>(this);
 }
 
 // Force class instantiation.
 // This ensures that the symbols are built, without having to export all our
 // code (and its baggage of #include and macros) in the header.
-template class BinASTParserPerTokenizer<BinASTTokenReaderMultipart>;
+template class BinASTParserPerTokenizer<BinTokenReaderMultipart>;
 
 }  // namespace frontend
 }  // namespace js
--- a/js/src/frontend/BinASTParserPerTokenizer.h
+++ b/js/src/frontend/BinASTParserPerTokenizer.h
@@ -14,18 +14,18 @@
  * and trusts its input (in particular, variable declarations).
  */
 
 #include "mozilla/Maybe.h"
 
 #include "frontend/BCEParserHandle.h"
 #include "frontend/BinASTEnum.h"
 #include "frontend/BinASTParserBase.h"
-#include "frontend/BinASTToken.h"
-#include "frontend/BinASTTokenReaderMultipart.h"
+#include "frontend/BinToken.h"
+#include "frontend/BinTokenReaderMultipart.h"
 #include "frontend/FullParseHandler.h"
 #include "frontend/ParseContext.h"
 #include "frontend/ParseNode.h"
 #include "frontend/SharedContext.h"
 
 #include "js/CompileOptions.h"
 #include "js/GCHashTable.h"
 #include "js/GCVector.h"
@@ -49,17 +49,17 @@ template <typename Tok>
 class BinASTParserPerTokenizer : public BinASTParserBase,
                                  public ErrorReporter,
                                  public BCEParserHandle {
  public:
   using Tokenizer = Tok;
 
   using AutoList = typename Tokenizer::AutoList;
   using AutoTaggedTuple = typename Tokenizer::AutoTaggedTuple;
-  using BinASTFields = typename Tokenizer::BinASTFields;
+  using BinFields = typename Tokenizer::BinFields;
   using Chars = typename Tokenizer::Chars;
 
  public:
   // Auto-generated types.
   using AssertedDeclaredKind = binast::AssertedDeclaredKind;
   using VariableDeclarationKind = binast::VariableDeclarationKind;
 
  public:
@@ -101,28 +101,28 @@ class BinASTParserPerTokenizer : public 
 
   MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseInvalidClosedVar(
       JSAtom* name);
   MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&>
   raiseMissingVariableInAssertedScope(JSAtom* name);
   MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&>
   raiseMissingDirectEvalInAssertedScope();
   MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseInvalidKind(
-      const char* superKind, const BinASTKind kind);
+      const char* superKind, const BinKind kind);
   MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseInvalidVariant(
-      const char* kind, const BinASTVariant value);
+      const char* kind, const BinVariant value);
   MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseMissingField(
-      const char* kind, const BinASTField field);
+      const char* kind, const BinField field);
   MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseEmpty(
       const char* description);
   MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseOOM();
   MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseError(
       const char* description);
   MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseError(
-      BinASTKind kind, const char* description);
+      BinKind kind, const char* description);
 
   // Ensure that this parser will never be used again.
   void poison();
 
   // The owner or the target of Asserted*Scope.
   enum class AssertedScopeKind {
     Block,
     Catch,
@@ -131,23 +131,22 @@ class BinASTParserPerTokenizer : public 
     Var,
   };
 
   // --- Auxiliary parsing functions
 
   // Build a function object for a function-producing production. Called AFTER
   // creating the scope.
   JS::Result<FunctionNode*> makeEmptyFunctionNode(const size_t start,
-                                                  const BinASTKind kind,
+                                                  const BinKind kind,
                                                   FunctionBox* funbox);
 
   JS::Result<FunctionNode*> buildFunction(const size_t start,
-                                          const BinASTKind kind,
-                                          ParseNode* name, ListNode* params,
-                                          ParseNode* body);
+                                          const BinKind kind, ParseNode* name,
+                                          ListNode* params, ParseNode* body);
   JS::Result<FunctionBox*> buildFunctionBox(GeneratorKind generatorKind,
                                             FunctionAsyncKind functionAsyncKind,
                                             FunctionSyntaxKind syntax,
                                             ParseNode* name);
 
   // Add name to a given scope.
   MOZ_MUST_USE JS::Result<Ok> addScopeName(
       AssertedScopeKind scopeKind, HandleAtom name, ParseContext::Scope* scope,
@@ -280,17 +279,17 @@ class BinASTParserPerTokenizer : public 
 
  protected:
   Rooted<LazyScript*> lazyScript_;
   FullParseHandler handler_;
 
   mozilla::Maybe<Tokenizer> tokenizer_;
   VariableDeclarationKind variableDeclarationKind_;
 
-  friend class BinASTParseContext;
+  friend class BinParseContext;
   friend class AutoVariableDeclarationKind;
 
   // Helper class: Restore field `variableDeclarationKind` upon leaving a scope.
   class MOZ_RAII AutoVariableDeclarationKind {
    public:
     explicit AutoVariableDeclarationKind(
         BinASTParserPerTokenizer<Tok>* parser MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
         : parser_(parser), kind(parser->variableDeclarationKind_) {
@@ -310,25 +309,25 @@ class BinASTParserPerTokenizer : public 
   // asFinalParser methods provide the access to BinASTParser class methods
   // of this instance.
   using FinalParser = BinASTParser<Tok>;
 
   inline FinalParser* asFinalParser();
   inline const FinalParser* asFinalParser() const;
 };
 
-class BinASTParseContext : public ParseContext {
+class BinParseContext : public ParseContext {
  public:
   template <typename Tok>
-  BinASTParseContext(JSContext* cx, BinASTParserPerTokenizer<Tok>* parser,
-                     SharedContext* sc, Directives* newDirectives)
+  BinParseContext(JSContext* cx, BinASTParserPerTokenizer<Tok>* parser,
+                  SharedContext* sc, Directives* newDirectives)
       : ParseContext(cx, parser->pc_, sc, *parser, parser->usedNames_,
                      newDirectives, /* isFull = */ true) {}
 };
 
 void TraceBinASTParser(JSTracer* trc, JS::AutoGCRooter* parser);
 
-extern template class BinASTParserPerTokenizer<BinASTTokenReaderMultipart>;
+extern template class BinASTParserPerTokenizer<BinTokenReaderMultipart>;
 
 }  // namespace frontend
 }  // namespace js
 
 #endif  // frontend_BinASTParserPerTokenizer_h
rename from js/src/frontend/BinAST-macros.h
rename to js/src/frontend/BinSource-macros.h
--- a/js/src/frontend/BinAST-macros.h
+++ b/js/src/frontend/BinSource-macros.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef frontend_BinAST_macros_h
-#define frontend_BinAST_macros_h
+#ifndef frontend_BinSource_macros_h
+#define frontend_BinSource_macros_h
 
 #include "vm/JSContext.h"
 
 // Evaluate an expression EXPR, checking that the result is not falsy.
 //
 // Throw `cx->alreadyReportedError()` if it returns 0/nullptr.
 #define BINJS_TRY(EXPR)                            \
   do {                                             \
@@ -54,9 +54,9 @@
 // In case of success, unwrap and assign the result to a new variable VAR.
 //
 // In case of error, propagate the error.
 #define BINJS_MOZ_TRY_DECL(VAR, EXPR)                            \
   auto _##VAR = EXPR;                                            \
   if (_##VAR.isErr()) return ::mozilla::Err(_##VAR.unwrapErr()); \
   auto VAR = _##VAR.unwrap();
 
-#endif  // frontend_BinAST_macros_h
+#endif  // frontend_BinSource_macros_h
rename from js/src/frontend/BinAST.webidl_
rename to js/src/frontend/BinSource.webidl_
rename from js/src/frontend/BinAST.yaml
rename to js/src/frontend/BinSource.yaml
--- a/js/src/frontend/BinAST.yaml
+++ b/js/src/frontend/BinSource.yaml
@@ -22,29 +22,29 @@ cpp:
   header: |
     /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
      * vim: set ts=8 sts=2 et sw=2 tw=80:
      * This Source Code Form is subject to the terms of the Mozilla Public
      * License, v. 2.0. If a copy of the MPL was not distributed with this
      * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
     // To generate this file, see the documentation in
-    // js/src/frontend/binast/README.md.
+    // js/src/frontend/binsource/README.md.
 
     #include "frontend/BinASTParser.h"
 
     #include "mozilla/ArrayUtils.h"
     #include "mozilla/Casting.h"
     #include "mozilla/Maybe.h"
     #include "mozilla/Move.h"
     #include "mozilla/PodOperations.h"
     #include "mozilla/Vector.h"
 
-    #include "frontend/BinAST-macros.h"
-    #include "frontend/BinASTTokenReaderMultipart.h"
+    #include "frontend/BinSource-macros.h"
+    #include "frontend/BinTokenReaderMultipart.h"
     #include "frontend/FullParseHandler.h"
     #include "frontend/ParseNode.h"
     #include "frontend/Parser.h"
     #include "frontend/SharedContext.h"
 
     #include "vm/RegExpObject.h"
 
     #include "frontend/ParseContext-inl.h"
@@ -59,43 +59,43 @@ cpp:
       return Tok::equals(left, right);
     }
 
   footer: |
 
     // Force class instantiation.
     // This ensures that the symbols are built, without having to export all our
     // code (and its baggage of #include and macros) in the header.
-    template class BinASTParser<BinASTTokenReaderMultipart>;
+    template class BinASTParser<BinTokenReaderMultipart>;
 
     } // namespace frontend
     } // namespace js
 
 hpp:
   # Rules for generating BinASTParser.h
   class:
     header: |
       /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
        * vim: set ts=8 sts=2 et sw=2 tw=80:
        * This Source Code Form is subject to the terms of the Mozilla Public
        * License, v. 2.0. If a copy of the MPL was not distributed with this
        * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
       // To generate this file, see the documentation in
-      // js/src/frontend/binast/README.md.
+      // js/src/frontend/binsource/README.md.
 
       #ifndef frontend_BinASTParser_h
       #define frontend_BinASTParser_h
 
       #include "mozilla/Maybe.h"
 
       #include "frontend/BCEParserHandle.h"
       #include "frontend/BinASTParserPerTokenizer.h"
-      #include "frontend/BinASTToken.h"
-      #include "frontend/BinASTTokenReaderMultipart.h"
+      #include "frontend/BinToken.h"
+      #include "frontend/BinTokenReaderMultipart.h"
       #include "frontend/FullParseHandler.h"
       #include "frontend/ParseContext.h"
       #include "frontend/ParseNode.h"
       #include "frontend/SharedContext.h"
 
       #include "js/CompileOptions.h"
       #include "js/GCHashTable.h"
       #include "js/GCVector.h"
@@ -106,17 +106,17 @@ hpp:
 
       template<typename Tok>
       class BinASTParser : public BinASTParserPerTokenizer<Tok> {
        public:
         using Base = BinASTParserPerTokenizer<Tok>;
 
         using Tokenizer = Tok;
 
-        using BinASTFields = typename Tokenizer::BinASTFields;
+        using BinFields = typename Tokenizer::BinFields;
         using AutoList = typename Tokenizer::AutoList;
         using AutoTaggedTuple = typename Tokenizer::AutoTaggedTuple;
         using Chars = typename Tokenizer::Chars;
 
        public:
         // Auto-generated types.
         using AssertedDeclaredKind = binast::AssertedDeclaredKind;
         using BinaryOperator = binast::BinaryOperator;
@@ -188,48 +188,48 @@ hpp:
         using Base::prependDirectivesToBody;
 
         using Base::forceStrictIfNecessary;
 
        public:
     footer: |
       };
 
-      extern template class BinASTParser<BinASTTokenReaderMultipart>;
+      extern template class BinASTParser<BinTokenReaderMultipart>;
 
       } // namespace frontend
       } // namespace js
 
       #endif // frontend_BinASTParser_h
 
   enums:
     header: |
       /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
        * vim: set ts=8 sts=2 et sw=2 tw=80:
        * This Source Code Form is subject to the terms of the Mozilla Public
        * License, v. 2.0. If a copy of the MPL was not distributed with this
        * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
       // To generate this file, see the documentation in
-      // js/src/frontend/binast/README.md.
+      // js/src/frontend/binsource/README.md.
 
       #ifndef frontend_BinASTEnum_h
       #define frontend_BinASTEnum_h
 
       namespace js {
       namespace frontend {
       namespace binast {
     footer: |
       } // namespace binast
       } // namespace frontend
       } // namespace js
 
       #endif // frontend_BinASTEnum_h
 
-  # Rules for generating BinASTToken.h
+  # Rules for generating BinToken.h
   tokens:
     kind:
       doc: |
         /**
          * The different kinds of Binary AST nodes, as per the specifications of
          * Binary AST.
          *
          * These kinds match roughly with the `ParseNodeKind` used internally.
@@ -282,31 +282,31 @@ hpp:
       /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
        * vim: set ts=8 sts=2 et sw=2 tw=80:
        * This Source Code Form is subject to the terms of the Mozilla Public
        * License, v. 2.0. If a copy of the MPL was not distributed with this
        * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 
       // To generate this file, see the documentation in
-      // js/src/frontend/binast/README.md.
+      // js/src/frontend/binsource/README.md.
 
-      #ifndef frontend_BinASTToken_h
-      #define frontend_BinASTToken_h
+      #ifndef frontend_BinToken_h
+      #define frontend_BinToken_h
 
       #include <stddef.h>
 
       /**
        * Definition of Binary AST tokens.
        *
        * In the Binary AST world, an AST is composed of nodes, where a node is
        * defined by:
-       * - a Kind (see `BinASTKind`);
+       * - a Kind (see `BinKind`);
        * - a list of fields, where each field is:
-       *    - a Name (see `BinASTField`);
+       *    - a Name (see `BinField`);
        *    - a Value, which may be either a node or a primitive value.
        *
        * The mapping between Kind and list of fields is determined entirely by
        * the grammar of Binary AST. The mapping between (Kind, Name) and the
        * structure of Value is also determined entirely by the grammar of
        * Binary AST.
        *
        * As per the specifications of Binary AST, kinds may be added as the
@@ -320,34 +320,34 @@ hpp:
        * unknown Kinds or Names.
        */
 
       namespace js {
       namespace frontend {
     footer: |
 
       /**
-       * Return a string describing a `BinASTKind`.
+       * Return a string describing a `BinKind`.
        */
-      const char* describeBinASTKind(const BinASTKind& kind);
+      const char* describeBinKind(const BinKind& kind);
 
       /**
-       * Return a string describing a `BinASTField`.
+       * Return a string describing a `BinField`.
        */
-      const char* describeBinASTField(const BinASTField& kind);
+      const char* describeBinField(const BinField& kind);
 
       /**
-       * Return a string describing a `BinASTVariant`.
+       * Return a string describing a `BinVariant`.
        */
-      const char* describeBinASTVariant(const BinASTVariant& kind);
+      const char* describeBinVariant(const BinVariant& kind);
 
       } // namespace frontend
       } // namespace js
 
-      #endif // frontend_BinASTToken_h
+      #endif // frontend_BinToken_h
 
 Arguments:
   init: |
     BINJS_TRY_DECL(result, handler_.newList(ParseNodeKind::Arguments,
                                             tokenizer_->pos(start)));
   append:
     handler_.addList(/* list = */ result, /* kid = */ item);
 
@@ -916,17 +916,17 @@ EagerFunctionExpression:
           syntax,
           (syntax != FunctionSyntaxKind::Setter &&
            syntax != FunctionSyntaxKind::Getter) ? name : nullptr));
 
         forceStrictIfNecessary(funbox, directives);
 
         // Push a new ParseContext. It will be used to parse `scope`, the arguments,
         // the function.
-        BinASTParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
+        BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
         BINJS_TRY(funpc.init());
         pc_->functionScope().useAsVarScope(pc_);
         MOZ_ASSERT(pc_->isFunctionBox());
 
         ParseContext::Scope lexicalScope(cx_, pc_, usedNames_);
         BINJS_TRY(lexicalScope.init(pc_));
         ListNode* params;
         ListNode* body;
@@ -1610,17 +1610,17 @@ VariableDeclarator:
       } else {
         result = bindingNameNode;
       }
     } else {
       // `var pattern = bar`
       if (!init) {
         // Here, `init` is required.
         return raiseMissingField("VariableDeclarator (with non-trivial pattern)",
-                                 BinASTField::Init);
+                                 BinField::Init);
       }
 
       MOZ_CRASH("Unimplemented: AssertedScope check for BindingPattern variable declaration");
       BINJS_TRY_VAR(result,
                     handler_.newAssignment(ParseNodeKind::AssignExpr, binding,
                                            init));
     }
 
rename from js/src/frontend/BinASTRuntimeSupport.cpp
rename to js/src/frontend/BinSourceRuntimeSupport.cpp
--- a/js/src/frontend/BinASTRuntimeSupport.cpp
+++ b/js/src/frontend/BinSourceRuntimeSupport.cpp
@@ -1,37 +1,37 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "frontend/BinASTRuntimeSupport.h"
+#include "frontend/BinSourceRuntimeSupport.h"
 
 #include "gc/Tracer.h"
 #include "js/Vector.h"
 #include "vm/StringType.h"
 
 namespace js {
 namespace frontend {
 
 /* static */
 BinASTSourceMetadata* BinASTSourceMetadata::Create(
-    const Vector<BinASTKind>& binASTKinds, uint32_t numStrings) {
-  uint32_t numBinASTKinds = binASTKinds.length();
+    const Vector<BinKind>& binKinds, uint32_t numStrings) {
+  uint32_t numBinKinds = binKinds.length();
 
   BinASTSourceMetadata* data = static_cast<BinASTSourceMetadata*>(
-      js_malloc(BinASTSourceMetadata::totalSize(numBinASTKinds, numStrings)));
+      js_malloc(BinASTSourceMetadata::totalSize(numBinKinds, numStrings)));
   if (!data) {
     return nullptr;
   }
 
-  new (data) BinASTSourceMetadata(numBinASTKinds, numStrings);
-  memcpy(data->binASTKindBase(), binASTKinds.begin(),
-         binASTKinds.length() * sizeof(BinASTKind));
+  new (data) BinASTSourceMetadata(numBinKinds, numStrings);
+  memcpy(data->binKindBase(), binKinds.begin(),
+         binKinds.length() * sizeof(BinKind));
 
   return data;
 }
 
 void BinASTSourceMetadata::trace(JSTracer* tracer) {
   JSAtom** base = atomsBase();
   for (uint32_t i = 0; i < numStrings_; i++) {
     if (base[i]) {
rename from js/src/frontend/BinASTRuntimeSupport.h
rename to js/src/frontend/BinSourceRuntimeSupport.h
--- a/js/src/frontend/BinASTRuntimeSupport.h
+++ b/js/src/frontend/BinSourceRuntimeSupport.h
@@ -1,37 +1,37 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef frontend_BinASTSupport_h
-#define frontend_BinASTSupport_h
+#ifndef frontend_BinSourceSupport_h
+#define frontend_BinSourceSupport_h
 
 #include "mozilla/HashFunctions.h"
 
-#include "frontend/BinASTToken.h"
+#include "frontend/BinToken.h"
 #include "gc/DeletePolicy.h"
 
 #include "js/AllocPolicy.h"
 #include "js/HashTable.h"
 #include "js/Result.h"
 #include "js/UniquePtr.h"
 #include "js/Vector.h"
 
 namespace js {
 
 class ScriptSource;
 
 // Support for parsing JS Binary ASTs.
 struct BinaryASTSupport {
-  using BinASTVariant = js::frontend::BinASTVariant;
-  using BinASTField = js::frontend::BinASTField;
-  using BinASTKind = js::frontend::BinASTKind;
+  using BinVariant = js::frontend::BinVariant;
+  using BinField = js::frontend::BinField;
+  using BinKind = js::frontend::BinKind;
 
   // A structure designed to perform fast char* + length lookup
   // without copies.
   struct CharSlice {
     const char* start_;
     uint32_t byteLen_;
     CharSlice(const CharSlice& other)
         : start_(other.start_), byteLen_(other.byteLen_) {}
@@ -59,85 +59,84 @@ struct BinaryASTSupport {
         return false;
       }
       return strncmp(key.start_, lookup.start_, key.byteLen_) == 0;
     }
   };
 
   BinaryASTSupport();
 
-  JS::Result<const BinASTVariant*> binASTVariant(JSContext*, const CharSlice);
-  JS::Result<const BinASTKind*> binASTKind(JSContext*, const CharSlice);
+  JS::Result<const BinVariant*> binVariant(JSContext*, const CharSlice);
+  JS::Result<const BinKind*> binKind(JSContext*, const CharSlice);
 
   bool ensureBinTablesInitialized(JSContext*);
 
  private:
-  bool ensureBinASTKindsInitialized(JSContext*);
-  bool ensureBinASTVariantsInitialized(JSContext*);
+  bool ensureBinKindsInitialized(JSContext*);
+  bool ensureBinVariantsInitialized(JSContext*);
 
  private:
   // A HashMap that can be queried without copies from a CharSlice key.
   // Initialized on first call. Keys are CharSlices into static strings.
-  using BinASTKindMap = js::HashMap<const CharSlice, BinASTKind, CharSlice,
-                                    js::SystemAllocPolicy>;
-  BinASTKindMap binASTKindMap_;
+  using BinKindMap =
+      js::HashMap<const CharSlice, BinKind, CharSlice, js::SystemAllocPolicy>;
+  BinKindMap binKindMap_;
 
-  using BinASTFieldMap = js::HashMap<const CharSlice, BinASTField, CharSlice,
-                                     js::SystemAllocPolicy>;
-  BinASTFieldMap binASTFieldMap_;
+  using BinFieldMap =
+      js::HashMap<const CharSlice, BinField, CharSlice, js::SystemAllocPolicy>;
+  BinFieldMap binFieldMap_;
 
-  using BinASTVariantMap = js::HashMap<const CharSlice, BinASTVariant,
-                                       CharSlice, js::SystemAllocPolicy>;
-  BinASTVariantMap binASTVariantMap_;
+  using BinVariantMap = js::HashMap<const CharSlice, BinVariant, CharSlice,
+                                    js::SystemAllocPolicy>;
+  BinVariantMap binVariantMap_;
 };
 
 namespace frontend {
 
 class BinASTSourceMetadata {
   using CharSlice = BinaryASTSupport::CharSlice;
 
   const uint32_t numStrings_;
-  const uint32_t numBinASTKinds_;
+  const uint32_t numBinKinds_;
 
   // The data lives inline in the allocation, after this class.
   inline JSAtom** atomsBase() {
     return reinterpret_cast<JSAtom**>(reinterpret_cast<uintptr_t>(this + 1));
   }
   inline CharSlice* sliceBase() {
     return reinterpret_cast<CharSlice*>(
         reinterpret_cast<uintptr_t>(atomsBase()) +
         numStrings_ * sizeof(JSAtom*));
   }
-  inline BinASTKind* binASTKindBase() {
-    return reinterpret_cast<BinASTKind*>(
-        reinterpret_cast<uintptr_t>(sliceBase()) +
-        numStrings_ * sizeof(CharSlice));
+  inline BinKind* binKindBase() {
+    return reinterpret_cast<BinKind*>(reinterpret_cast<uintptr_t>(sliceBase()) +
+                                      numStrings_ * sizeof(CharSlice));
   }
 
-  static inline size_t totalSize(uint32_t numBinASTKinds, uint32_t numStrings) {
+  static inline size_t totalSize(uint32_t numBinKinds, uint32_t numStrings) {
     return sizeof(BinASTSourceMetadata) + numStrings * sizeof(JSAtom*) +
-           numStrings * sizeof(CharSlice) + numBinASTKinds * sizeof(BinASTKind);
+           numStrings * sizeof(CharSlice) + numBinKinds * sizeof(BinKind);
   }
 
-  BinASTSourceMetadata(uint32_t numBinASTKinds, uint32_t numStrings)
-      : numStrings_(numStrings), numBinASTKinds_(numBinASTKinds) {}
+  BinASTSourceMetadata(uint32_t numBinKinds, uint32_t numStrings)
+      : numStrings_(numStrings), numBinKinds_(numBinKinds) {}
 
   friend class js::ScriptSource;
 
  public:
-  static BinASTSourceMetadata* Create(const Vector<BinASTKind>& binASTKinds,
+  static BinASTSourceMetadata* Create(const Vector<BinKind>& binKinds,
                                       uint32_t numStrings);
 
-  inline uint32_t numBinASTKinds() { return numBinASTKinds_; }
+  inline uint32_t numBinKinds() { return numBinKinds_; }
 
   inline uint32_t numStrings() { return numStrings_; }
 
-  inline BinASTKind& getBinASTKind(uint32_t index) {
-    MOZ_ASSERT(index < numBinASTKinds_);
-    return binASTKindBase()[index];
+  inline BinKind& getBinKind(uint32_t index) {
+    MOZ_ASSERT(index < numBinKinds_);
+    return binKindBase()[index];
   }
 
   inline CharSlice& getSlice(uint32_t index) {
     MOZ_ASSERT(index < numStrings_);
     return sliceBase()[index];
   }
 
   inline JSAtom*& getAtom(uint32_t index) {
@@ -151,9 +150,9 @@ class BinASTSourceMetadata {
 }  // namespace frontend
 
 typedef UniquePtr<frontend::BinASTSourceMetadata,
                   GCManagedDeletePolicy<frontend::BinASTSourceMetadata>>
     UniqueBinASTSourceMetadataPtr;
 
 }  // namespace js
 
-#endif  // frontend_BinASTSupport_h
+#endif  // frontend_BinSourceSupport_h
rename from js/src/frontend/BinASTToken.cpp
rename to js/src/frontend/BinToken.cpp
--- a/js/src/frontend/BinASTToken.cpp
+++ b/js/src/frontend/BinToken.cpp
@@ -1,155 +1,153 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "frontend/BinASTToken.h"
+#include "frontend/BinToken.h"
 
 #include "mozilla/Maybe.h"
 
 #include <sys/types.h>
 
-#include "frontend/BinASTRuntimeSupport.h"
+#include "frontend/BinSourceRuntimeSupport.h"
 #include "frontend/TokenStream.h"
 #include "js/Result.h"
 #include "vm/JSContext.h"
 
 namespace js {
 namespace frontend {
 
-const BinaryASTSupport::CharSlice BINASTKIND_DESCRIPTIONS[] = {
+const BinaryASTSupport::CharSlice BINKIND_DESCRIPTIONS[] = {
 #define WITH_VARIANT(_, SPEC_NAME) \
   BinaryASTSupport::CharSlice(SPEC_NAME, sizeof(SPEC_NAME) - 1),
     FOR_EACH_BIN_KIND(WITH_VARIANT)
 #undef WITH_VARIANT
 };
 
-const BinaryASTSupport::CharSlice BINASTFIELD_DESCRIPTIONS[] = {
+const BinaryASTSupport::CharSlice BINFIELD_DESCRIPTIONS[] = {
 #define WITH_VARIANT(_, SPEC_NAME) \
   BinaryASTSupport::CharSlice(SPEC_NAME, sizeof(SPEC_NAME) - 1),
     FOR_EACH_BIN_FIELD(WITH_VARIANT)
 #undef WITH_VARIANT
 };
 
-const BinaryASTSupport::CharSlice BINASTVARIANT_DESCRIPTIONS[] = {
+const BinaryASTSupport::CharSlice BINVARIANT_DESCRIPTIONS[] = {
 #define WITH_VARIANT(_, SPEC_NAME) \
   BinaryASTSupport::CharSlice(SPEC_NAME, sizeof(SPEC_NAME) - 1),
     FOR_EACH_BIN_VARIANT(WITH_VARIANT)
 #undef WITH_VARIANT
 };
 
-const BinaryASTSupport::CharSlice& getBinASTKind(const BinASTKind& variant) {
-  return BINASTKIND_DESCRIPTIONS[static_cast<size_t>(variant)];
+const BinaryASTSupport::CharSlice& getBinKind(const BinKind& variant) {
+  return BINKIND_DESCRIPTIONS[static_cast<size_t>(variant)];
 }
 
-const BinaryASTSupport::CharSlice& getBinASTVariant(
-    const BinASTVariant& variant) {
-  return BINASTVARIANT_DESCRIPTIONS[static_cast<size_t>(variant)];
+const BinaryASTSupport::CharSlice& getBinVariant(const BinVariant& variant) {
+  return BINVARIANT_DESCRIPTIONS[static_cast<size_t>(variant)];
 }
 
-const BinaryASTSupport::CharSlice& getBinASTField(const BinASTField& variant) {
-  return BINASTFIELD_DESCRIPTIONS[static_cast<size_t>(variant)];
+const BinaryASTSupport::CharSlice& getBinField(const BinField& variant) {
+  return BINFIELD_DESCRIPTIONS[static_cast<size_t>(variant)];
 }
 
-const char* describeBinASTKind(const BinASTKind& variant) {
-  return getBinASTKind(variant).begin();
+const char* describeBinKind(const BinKind& variant) {
+  return getBinKind(variant).begin();
 }
 
-const char* describeBinASTField(const BinASTField& variant) {
-  return getBinASTField(variant).begin();
+const char* describeBinField(const BinField& variant) {
+  return getBinField(variant).begin();
 }
 
-const char* describeBinASTVariant(const BinASTVariant& variant) {
-  return getBinASTVariant(variant).begin();
+const char* describeBinVariant(const BinVariant& variant) {
+  return getBinVariant(variant).begin();
 }
 
 }  // namespace frontend
 
 BinaryASTSupport::BinaryASTSupport()
-    : binASTKindMap_(frontend::BINASTKIND_LIMIT),
-      binASTFieldMap_(frontend::BINASTFIELD_LIMIT),
-      binASTVariantMap_(frontend::BINASTVARIANT_LIMIT) {}
+    : binKindMap_(frontend::BINKIND_LIMIT),
+      binFieldMap_(frontend::BINFIELD_LIMIT),
+      binVariantMap_(frontend::BINVARIANT_LIMIT) {}
 
 /**
  * It is expected that all bin tables are initialized on the main thread, and
  * that any helper threads will find the read-only tables properly initialized,
  * so that they can do their accesses safely without taking any locks.
  */
 bool BinaryASTSupport::ensureBinTablesInitialized(JSContext* cx) {
-  return ensureBinASTKindsInitialized(cx) &&
-         ensureBinASTVariantsInitialized(cx);
+  return ensureBinKindsInitialized(cx) && ensureBinVariantsInitialized(cx);
 }
 
-bool BinaryASTSupport::ensureBinASTKindsInitialized(JSContext* cx) {
+bool BinaryASTSupport::ensureBinKindsInitialized(JSContext* cx) {
   MOZ_ASSERT(!cx->helperThread());
-  if (binASTKindMap_.empty()) {
-    for (size_t i = 0; i < frontend::BINASTKIND_LIMIT; ++i) {
-      const BinASTKind variant = static_cast<BinASTKind>(i);
-      const CharSlice& key = getBinASTKind(variant);
-      auto ptr = binASTKindMap_.lookupForAdd(key);
+  if (binKindMap_.empty()) {
+    for (size_t i = 0; i < frontend::BINKIND_LIMIT; ++i) {
+      const BinKind variant = static_cast<BinKind>(i);
+      const CharSlice& key = getBinKind(variant);
+      auto ptr = binKindMap_.lookupForAdd(key);
       MOZ_ASSERT(!ptr);
-      if (!binASTKindMap_.add(ptr, key, variant)) {
+      if (!binKindMap_.add(ptr, key, variant)) {
         ReportOutOfMemory(cx);
         return false;
       }
     }
   }
 
   return true;
 }
 
-bool BinaryASTSupport::ensureBinASTVariantsInitialized(JSContext* cx) {
+bool BinaryASTSupport::ensureBinVariantsInitialized(JSContext* cx) {
   MOZ_ASSERT(!cx->helperThread());
-  if (binASTVariantMap_.empty()) {
-    for (size_t i = 0; i < frontend::BINASTVARIANT_LIMIT; ++i) {
-      const BinASTVariant variant = static_cast<BinASTVariant>(i);
-      const CharSlice& key = getBinASTVariant(variant);
-      auto ptr = binASTVariantMap_.lookupForAdd(key);
+  if (binVariantMap_.empty()) {
+    for (size_t i = 0; i < frontend::BINVARIANT_LIMIT; ++i) {
+      const BinVariant variant = static_cast<BinVariant>(i);
+      const CharSlice& key = getBinVariant(variant);
+      auto ptr = binVariantMap_.lookupForAdd(key);
       MOZ_ASSERT(!ptr);
-      if (!binASTVariantMap_.add(ptr, key, variant)) {
+      if (!binVariantMap_.add(ptr, key, variant)) {
         ReportOutOfMemory(cx);
         return false;
       }
     }
   }
   return true;
 }
 
-JS::Result<const js::frontend::BinASTKind*> BinaryASTSupport::binASTKind(
+JS::Result<const js::frontend::BinKind*> BinaryASTSupport::binKind(
     JSContext* cx, const CharSlice key) {
-  MOZ_ASSERT_IF(cx->helperThread(), !binASTKindMap_.empty());
+  MOZ_ASSERT_IF(cx->helperThread(), !binKindMap_.empty());
   if (!cx->helperThread()) {
     // Initialize Lazily if on main thread.
-    if (!ensureBinASTKindsInitialized(cx)) {
+    if (!ensureBinKindsInitialized(cx)) {
       return cx->alreadyReportedError();
     }
   }
 
-  auto ptr = binASTKindMap_.readonlyThreadsafeLookup(key);
+  auto ptr = binKindMap_.readonlyThreadsafeLookup(key);
   if (!ptr) {
     return nullptr;
   }
 
   return &ptr->value();
 }
 
-JS::Result<const js::frontend::BinASTVariant*> BinaryASTSupport::binASTVariant(
+JS::Result<const js::frontend::BinVariant*> BinaryASTSupport::binVariant(
     JSContext* cx, const CharSlice key) {
-  MOZ_ASSERT_IF(cx->helperThread(), !binASTVariantMap_.empty());
+  MOZ_ASSERT_IF(cx->helperThread(), !binVariantMap_.empty());
   if (!cx->helperThread()) {
     // Initialize lazily if on main thread.
-    if (!ensureBinASTVariantsInitialized(cx)) {
+    if (!ensureBinVariantsInitialized(cx)) {
       return cx->alreadyReportedError();
     }
   }
 
-  auto ptr = binASTVariantMap_.readonlyThreadsafeLookup(key);
+  auto ptr = binVariantMap_.readonlyThreadsafeLookup(key);
   if (!ptr) {
     return nullptr;
   }
 
   return &ptr->value();
 }
 
 }  // namespace js
rename from js/src/frontend/BinASTToken.h
rename to js/src/frontend/BinToken.h
--- a/js/src/frontend/BinASTToken.h
+++ b/js/src/frontend/BinToken.h
@@ -2,31 +2,31 @@
 // please DO NOT EDIT BY HAND.
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // To generate this file, see the documentation in
-// js/src/frontend/binast/README.md.
+// js/src/frontend/binsource/README.md.
 
-#ifndef frontend_BinASTToken_h
-#define frontend_BinASTToken_h
+#ifndef frontend_BinToken_h
+#define frontend_BinToken_h
 
 #include <stddef.h>
 
 /**
  * Definition of Binary AST tokens.
  *
  * In the Binary AST world, an AST is composed of nodes, where a node is
  * defined by:
- * - a Kind (see `BinASTKind`);
+ * - a Kind (see `BinKind`);
  * - a list of fields, where each field is:
- *    - a Name (see `BinASTField`);
+ *    - a Name (see `BinField`);
  *    - a Value, which may be either a node or a primitive value.
  *
  * The mapping between Kind and list of fields is determined entirely by
  * the grammar of Binary AST. The mapping between (Kind, Name) and the
  * structure of Value is also determined entirely by the grammar of
  * Binary AST.
  *
  * As per the specifications of Binary AST, kinds may be added as the
@@ -180,24 +180,24 @@ namespace frontend {
   F(UpdateExpression, "UpdateExpression")                                     \
   F(VariableDeclaration, "VariableDeclaration")                               \
   F(VariableDeclarator, "VariableDeclarator")                                 \
   F(WhileStatement, "WhileStatement")                                         \
   F(WithStatement, "WithStatement")                                           \
   F(YieldExpression, "YieldExpression")                                       \
   F(YieldStarExpression, "YieldStarExpression")
 
-enum class BinASTKind {
+enum class BinKind {
 #define EMIT_ENUM(name, _) name,
   FOR_EACH_BIN_KIND(EMIT_ENUM)
 #undef EMIT_ENUM
 };
 
-// The number of distinct values of BinASTKind.
-const size_t BINASTKIND_LIMIT = 120;
+// The number of distinct values of BinKind.
+const size_t BINKIND_LIMIT = 120;
 
 /**
  * The different fields of Binary AST nodes, as per the specifications of
  * Binary AST.
  *
  * Usage:
  *
  * ```c++
@@ -273,24 +273,24 @@ const size_t BINASTKIND_LIMIT = 120;
   F(Scope, "scope")                                   \
   F(Statements, "statements")                         \
   F(Super, "super")                                   \
   F(Tag, "tag")                                       \
   F(Test, "test")                                     \
   F(Update, "update")                                 \
   F(Value, "value")
 
-enum class BinASTField {
+enum class BinField {
 #define EMIT_ENUM(name, _) name,
   FOR_EACH_BIN_FIELD(EMIT_ENUM)
 #undef EMIT_ENUM
 };
 
-// The number of distinct values of BinASTField.
-const size_t BINASTFIELD_LIMIT = 69;
+// The number of distinct values of BinField.
+const size_t BINFIELD_LIMIT = 69;
 
 /**
  * The different variants of Binary AST string enums, as per
  * the specifications of Binary AST, as a single macro and
  * `enum class`.
  *
  * Separate enum classes are also defined in BinASTParser.h.
  *
@@ -349,36 +349,36 @@ const size_t BINASTFIELD_LIMIT = 69;
   F(UnaryOperatorNot, "!")                                    \
   F(UnaryOperatorTypeof, "typeof")                            \
   F(UnaryOperatorVoid, "void")                                \
   F(UpdateOperatorDecr, "--")                                 \
   F(UpdateOperatorIncr, "++")                                 \
   F(VariableDeclarationKindConst, "const")                    \
   F(VariableDeclarationKindLet, "let")
 
-enum class BinASTVariant {
+enum class BinVariant {
 #define EMIT_ENUM(name, _) name,
   FOR_EACH_BIN_VARIANT(EMIT_ENUM)
 #undef EMIT_ENUM
 };
 
-// The number of distinct values of BinASTVariant.
-const size_t BINASTVARIANT_LIMIT = 49;
+// The number of distinct values of BinVariant.
+const size_t BINVARIANT_LIMIT = 49;
 
 /**
- * Return a string describing a `BinASTKind`.
+ * Return a string describing a `BinKind`.
  */
-const char* describeBinASTKind(const BinASTKind& kind);
+const char* describeBinKind(const BinKind& kind);
 
 /**
- * Return a string describing a `BinASTField`.
+ * Return a string describing a `BinField`.
  */
-const char* describeBinASTField(const BinASTField& kind);
+const char* describeBinField(const BinField& kind);
 
 /**
- * Return a string describing a `BinASTVariant`.
+ * Return a string describing a `BinVariant`.
  */
-const char* describeBinASTVariant(const BinASTVariant& kind);
+const char* describeBinVariant(const BinVariant& kind);
 
 }  // namespace frontend
 }  // namespace js
 
-#endif  // frontend_BinASTToken_h
+#endif  // frontend_BinToken_h
rename from js/src/frontend/BinASTTokenReaderBase.cpp
rename to js/src/frontend/BinTokenReaderBase.cpp
--- a/js/src/frontend/BinASTTokenReaderBase.cpp
+++ b/js/src/frontend/BinTokenReaderBase.cpp
@@ -1,108 +1,108 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "frontend/BinASTTokenReaderBase.h"
+#include "frontend/BinTokenReaderBase.h"
 
-#include "frontend/BinAST-macros.h"
+#include "frontend/BinSource-macros.h"
 #include "js/Result.h"
 
 namespace js {
 namespace frontend {
 
 template <typename T>
 using ErrorResult = mozilla::GenericErrorResult<T>;
 
 // We use signalling NaN (which doesn't exist in the JS syntax)
 // to represent a `null` number.
 const uint64_t NULL_FLOAT_REPRESENTATION = 0x7FF0000000000001;
 
-void BinASTTokenReaderBase::updateLatestKnownGood() {
+void BinTokenReaderBase::updateLatestKnownGood() {
   MOZ_ASSERT(current_ >= start_);
   const size_t update = current_ - start_;
   MOZ_ASSERT(update >= latestKnownGoodPos_);
   latestKnownGoodPos_ = update;
 }
 
-ErrorResult<JS::Error&> BinASTTokenReaderBase::raiseError(
+ErrorResult<JS::Error&> BinTokenReaderBase::raiseError(
     const char* description) {
   MOZ_ASSERT(!hasRaisedError());
   errorReporter_->errorNoOffset(JSMSG_BINAST, description);
   return cx_->alreadyReportedError();
 }
 
-ErrorResult<JS::Error&> BinASTTokenReaderBase::raiseOOM() {
+ErrorResult<JS::Error&> BinTokenReaderBase::raiseOOM() {
   ReportOutOfMemory(cx_);
   return cx_->alreadyReportedError();
 }
 
-ErrorResult<JS::Error&> BinASTTokenReaderBase::raiseInvalidNumberOfFields(
-    const BinASTKind kind, const uint32_t expected, const uint32_t got) {
+ErrorResult<JS::Error&> BinTokenReaderBase::raiseInvalidNumberOfFields(
+    const BinKind kind, const uint32_t expected, const uint32_t got) {
   Sprinter out(cx_);
   BINJS_TRY(out.init());
   BINJS_TRY(out.printf("In %s, invalid number of fields: expected %u, got %u",
-                       describeBinASTKind(kind), expected, got));
+                       describeBinKind(kind), expected, got));
   return raiseError(out.string());
 }
 
-ErrorResult<JS::Error&> BinASTTokenReaderBase::raiseInvalidField(
-    const char* kind, const BinASTField field) {
+ErrorResult<JS::Error&> BinTokenReaderBase::raiseInvalidField(
+    const char* kind, const BinField field) {
   Sprinter out(cx_);
   BINJS_TRY(out.init());
-  BINJS_TRY(out.printf("In %s, invalid field '%s'", kind,
-                       describeBinASTField(field)));
+  BINJS_TRY(
+      out.printf("In %s, invalid field '%s'", kind, describeBinField(field)));
   return raiseError(out.string());
 }
 
-bool BinASTTokenReaderBase::hasRaisedError() const {
+bool BinTokenReaderBase::hasRaisedError() const {
   if (cx_->helperThread()) {
     // When performing off-main-thread parsing, we don't set a pending
     // exception but instead add a pending compile error.
     return cx_->isCompileErrorPending();
   }
 
   return cx_->isExceptionPending();
 }
 
-size_t BinASTTokenReaderBase::offset() const { return current_ - start_; }
+size_t BinTokenReaderBase::offset() const { return current_ - start_; }
 
-TokenPos BinASTTokenReaderBase::pos() { return pos(offset()); }
+TokenPos BinTokenReaderBase::pos() { return pos(offset()); }
 
-TokenPos BinASTTokenReaderBase::pos(size_t start) {
+TokenPos BinTokenReaderBase::pos(size_t start) {
   TokenPos pos;
   pos.begin = start;
   pos.end = current_ - start_;
   MOZ_ASSERT(pos.end >= pos.begin);
   return pos;
 }
 
-void BinASTTokenReaderBase::seek(size_t offset) {
+void BinTokenReaderBase::seek(size_t offset) {
   MOZ_ASSERT(start_ + offset >= start_ && start_ + offset < stop_);
   current_ = start_ + offset;
 }
 
-JS::Result<Ok> BinASTTokenReaderBase::readBuf(uint8_t* bytes, uint32_t len) {
+JS::Result<Ok> BinTokenReaderBase::readBuf(uint8_t* bytes, uint32_t len) {
   MOZ_ASSERT(!hasRaisedError());
   MOZ_ASSERT(len > 0);
 
   if (stop_ < current_ + len) {
     return raiseError("Buffer exceeds length");
   }
 
   for (uint32_t i = 0; i < len; ++i) {
     *bytes++ = *current_++;
   }
 
   return Ok();
 }
 
-JS::Result<uint8_t> BinASTTokenReaderBase::readByte() {
+JS::Result<uint8_t> BinTokenReaderBase::readByte() {
   uint8_t byte;
   MOZ_TRY(readBuf(&byte, 1));
   return byte;
 }
 
 }  // namespace frontend
 }  // namespace js
rename from js/src/frontend/BinASTTokenReaderBase.h
rename to js/src/frontend/BinTokenReaderBase.h
--- a/js/src/frontend/BinASTTokenReaderBase.h
+++ b/js/src/frontend/BinTokenReaderBase.h
@@ -1,31 +1,31 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef frontend_BinASTTokenReaderBase_h
-#define frontend_BinASTTokenReaderBase_h
+#ifndef frontend_BinTokenReaderBase_h
+#define frontend_BinTokenReaderBase_h
 
-#include "frontend/BinASTToken.h"
+#include "frontend/BinToken.h"
 #include "frontend/ErrorReporter.h"
 #include "frontend/TokenStream.h"
 
 #include "js/Result.h"
 #include "js/TypeDecls.h"
 
 namespace js {
 namespace frontend {
 
 // A constant used by tokenizers to represent a null float.
 extern const uint64_t NULL_FLOAT_REPRESENTATION;
 
-class MOZ_STACK_CLASS BinASTTokenReaderBase {
+class MOZ_STACK_CLASS BinTokenReaderBase {
  public:
   template <typename T>
   using ErrorResult = mozilla::GenericErrorResult<T>;
 
   // The information needed to skip a subtree.
   class SkippableSubTree {
    public:
     SkippableSubTree(const size_t startOffset, const size_t length)
@@ -62,23 +62,23 @@ class MOZ_STACK_CLASS BinASTTokenReaderB
   /**
    * Raise an error.
    *
    * Once `raiseError` has been called, the tokenizer is poisoned.
    */
   MOZ_MUST_USE ErrorResult<JS::Error&> raiseError(const char* description);
   MOZ_MUST_USE ErrorResult<JS::Error&> raiseOOM();
   MOZ_MUST_USE ErrorResult<JS::Error&> raiseInvalidNumberOfFields(
-      const BinASTKind kind, const uint32_t expected, const uint32_t got);
-  MOZ_MUST_USE ErrorResult<JS::Error&> raiseInvalidField(
-      const char* kind, const BinASTField field);
+      const BinKind kind, const uint32_t expected, const uint32_t got);
+  MOZ_MUST_USE ErrorResult<JS::Error&> raiseInvalidField(const char* kind,
+                                                         const BinField field);
 
  protected:
-  BinASTTokenReaderBase(JSContext* cx, ErrorReporter* er, const uint8_t* start,
-                        const size_t length)
+  BinTokenReaderBase(JSContext* cx, ErrorReporter* er, const uint8_t* start,
+                     const size_t length)
       : cx_(cx),
         errorReporter_(er),
         poisoned_(false),
         start_(start),
         current_(start),
         stop_(start + length),
         latestKnownGoodPos_(0) {
     MOZ_ASSERT(errorReporter_);
@@ -167,17 +167,17 @@ class MOZ_STACK_CLASS BinASTTokenReaderB
 
   // The last+1 byte of the buffer.
   const uint8_t* stop_;
 
   // Latest known good position. Used for error reporting.
   size_t latestKnownGoodPos_;
 
  private:
-  BinASTTokenReaderBase(const BinASTTokenReaderBase&) = delete;
-  BinASTTokenReaderBase(BinASTTokenReaderBase&&) = delete;
-  BinASTTokenReaderBase& operator=(BinASTTokenReaderBase&) = delete;
+  BinTokenReaderBase(const BinTokenReaderBase&) = delete;
+  BinTokenReaderBase(BinTokenReaderBase&&) = delete;
+  BinTokenReaderBase& operator=(BinTokenReaderBase&) = delete;
 };
 
 }  // namespace frontend
 }  // namespace js
 
-#endif  // frontend_BinASTTokenReaderBase_h
+#endif  // frontend_BinTokenReaderBase_h
rename from js/src/frontend/BinASTTokenReaderMultipart.cpp
rename to js/src/frontend/BinTokenReaderMultipart.cpp
--- a/js/src/frontend/BinASTTokenReaderMultipart.cpp
+++ b/js/src/frontend/BinTokenReaderMultipart.cpp
@@ -1,26 +1,26 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "frontend/BinASTTokenReaderMultipart.h"
+#include "frontend/BinTokenReaderMultipart.h"
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Casting.h"
 #include "mozilla/EndianUtils.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/ScopeExit.h"
 
 #include <utility>
 
-#include "frontend/BinAST-macros.h"
-#include "frontend/BinASTRuntimeSupport.h"
+#include "frontend/BinSource-macros.h"
+#include "frontend/BinSourceRuntimeSupport.h"
 #include "frontend/BytecodeCompiler.h" // IsIdentifier
 
 #include "js/Result.h"
 
 namespace js {
 namespace frontend {
 
 // The magic header, at the start of every binjs file.
@@ -35,52 +35,52 @@ const char SECTION_HEADER_TREE[] = "[TRE
 
 // The (only) internal compression mechanism understood by this parser.
 const char COMPRESSION_IDENTITY[] = "identity;";
 
 // The maximal number of distinct strings that may be declared in a
 // single file.
 const uint32_t MAX_NUMBER_OF_STRINGS = 32768;
 
-using AutoList = BinASTTokenReaderMultipart::AutoList;
-using AutoTaggedTuple = BinASTTokenReaderMultipart::AutoTaggedTuple;
+using AutoList = BinTokenReaderMultipart::AutoList;
+using AutoTaggedTuple = BinTokenReaderMultipart::AutoTaggedTuple;
 using CharSlice = BinaryASTSupport::CharSlice;
-using Chars = BinASTTokenReaderMultipart::Chars;
+using Chars = BinTokenReaderMultipart::Chars;
 
-BinASTTokenReaderMultipart::BinASTTokenReaderMultipart(JSContext* cx,
-                                                       ErrorReporter* er,
-                                                       const uint8_t* start,
-                                                       const size_t length)
-    : BinASTTokenReaderBase(cx, er, start, length),
+BinTokenReaderMultipart::BinTokenReaderMultipart(JSContext* cx,
+                                                 ErrorReporter* er,
+                                                 const uint8_t* start,
+                                                 const size_t length)
+    : BinTokenReaderBase(cx, er, start, length),
       metadata_(nullptr),
       posBeforeTree_(nullptr) {
   MOZ_ASSERT(er);
 }
 
-BinASTTokenReaderMultipart::~BinASTTokenReaderMultipart() {
+BinTokenReaderMultipart::~BinTokenReaderMultipart() {
   if (metadata_ && metadataOwned_ == MetadataOwnership::Owned) {
     UniqueBinASTSourceMetadataPtr ptr(metadata_);
   }
 }
 
-BinASTSourceMetadata* BinASTTokenReaderMultipart::takeMetadata() {
+BinASTSourceMetadata* BinTokenReaderMultipart::takeMetadata() {
   MOZ_ASSERT(metadataOwned_ == MetadataOwnership::Owned);
   metadataOwned_ = MetadataOwnership::Unowned;
   return metadata_;
 }
 
-JS::Result<Ok> BinASTTokenReaderMultipart::initFromScriptSource(
+JS::Result<Ok> BinTokenReaderMultipart::initFromScriptSource(
     ScriptSource* scriptSource) {
   metadata_ = scriptSource->binASTSourceMetadata();
   metadataOwned_ = MetadataOwnership::Unowned;
 
   return Ok();
 }
 
-JS::Result<Ok> BinASTTokenReaderMultipart::readHeader() {
+JS::Result<Ok> BinTokenReaderMultipart::readHeader() {
   // Check that we don't call this function twice.
   MOZ_ASSERT(!posBeforeTree_);
 
   // Read global headers.
   MOZ_TRY(readConst(MAGIC_HEADER));
   BINJS_MOZ_TRY_DECL(version, readInternalUint32());
 
   // For the moment, MAGIC_FORMAT_VERSION is 0. Once we have a story
@@ -98,39 +98,39 @@ JS::Result<Ok> BinASTTokenReaderMultipar
   const auto posBeforeGrammar = current_;
 
   if (posBeforeGrammar + grammarByteLen > stop_ ||
       posBeforeGrammar + grammarByteLen < current_) {  // Sanity check.
     return raiseError("Invalid byte length in grammar table");
   }
 
   BINJS_MOZ_TRY_DECL(grammarNumberOfEntries, readInternalUint32());
-  if (grammarNumberOfEntries > BINASTKIND_LIMIT) {  // Sanity check.
+  if (grammarNumberOfEntries > BINKIND_LIMIT) {  // Sanity check.
     return raiseError("Invalid number of entries in grammar table");
   }
 
-  // This table maps BinASTKind index -> BinASTKind.
+  // This table maps BinKind index -> BinKind.
   // Initialize and populate.
-  Vector<BinASTKind> grammarTable_(cx_);
+  Vector<BinKind> grammarTable_(cx_);
   if (!grammarTable_.reserve(grammarNumberOfEntries)) {
     return raiseOOM();
   }
 
   for (uint32_t i = 0; i < grammarNumberOfEntries; ++i) {
     BINJS_MOZ_TRY_DECL(byteLen, readInternalUint32());
     if (current_ + byteLen > stop_) {
       return raiseError("Invalid byte length in grammar table");
     }
     if (current_ + byteLen < current_) {  // Overflow.
       return raiseError("Invalid byte length in grammar table");
     }
     CharSlice name((const char*)current_, byteLen);
     current_ += byteLen;
 
-    BINJS_MOZ_TRY_DECL(kind, cx_->runtime()->binast().binASTKind(cx_, name));
+    BINJS_MOZ_TRY_DECL(kind, cx_->runtime()->binast().binKind(cx_, name));
     if (!kind) {
       return raiseError("Invalid entry in grammar table");
     }
 
     grammarTable_.infallibleAppend(
         *kind);  // We called `reserve` before the loop.
   }
   if (current_ != grammarByteLen + posBeforeGrammar) {
@@ -210,23 +210,23 @@ JS::Result<Ok> BinASTTokenReaderMultipar
       posBeforeTree_ + treeByteLen < posBeforeTree_) {  // Sanity check.
     return raiseError("Invalid byte length in tree table");
   }
 
   // At this stage, we're ready to start reading the tree.
   return Ok();
 }
 
-void BinASTTokenReaderMultipart::traceMetadata(JSTracer* trc) {
+void BinTokenReaderMultipart::traceMetadata(JSTracer* trc) {
   if (metadata_) {
     metadata_->trace(trc);
   }
 }
 
-JS::Result<bool> BinASTTokenReaderMultipart::readBool() {
+JS::Result<bool> BinTokenReaderMultipart::readBool() {
   updateLatestKnownGood();
   BINJS_MOZ_TRY_DECL(byte, readByte());
 
   switch (byte) {
     case 0:
       return false;
     case 1:
       return true;
@@ -236,17 +236,17 @@ JS::Result<bool> BinASTTokenReaderMultip
       return raiseError("Invalid boolean value");
   }
 }
 
 // Nullable doubles (little-endian)
 //
 // NULL_FLOAT_REPRESENTATION (signaling NaN) => null
 // anything other 64 bit sequence => IEEE-764 64-bit floating point number
-JS::Result<double> BinASTTokenReaderMultipart::readDouble() {
+JS::Result<double> BinTokenReaderMultipart::readDouble() {
   updateLatestKnownGood();
 
   uint8_t bytes[8];
   MOZ_ASSERT(sizeof(bytes) == sizeof(double));
   MOZ_TRY(
       readBuf(reinterpret_cast<uint8_t*>(bytes), mozilla::ArrayLength(bytes)));
 
   // Decode little-endian.
@@ -257,75 +257,75 @@ JS::Result<double> BinASTTokenReaderMult
   }
 
   // Canonicalize NaN, just to make sure another form of signalling NaN
   // doesn't slip past us.
   return JS::CanonicalizeNaN(mozilla::BitwiseCast<double>(asInt));
 }
 
 // A single atom is represented as an index into the table of strings.
-JS::Result<JSAtom*> BinASTTokenReaderMultipart::readMaybeAtom() {
+JS::Result<JSAtom*> BinTokenReaderMultipart::readMaybeAtom() {
   updateLatestKnownGood();
   BINJS_MOZ_TRY_DECL(index, readInternalUint32());
 
   if (index >= metadata_->numStrings()) {
     return raiseError("Invalid index to strings table");
   }
   return metadata_->getAtom(index);
 }
 
-JS::Result<JSAtom*> BinASTTokenReaderMultipart::readAtom() {
+JS::Result<JSAtom*> BinTokenReaderMultipart::readAtom() {
   BINJS_MOZ_TRY_DECL(maybe, readMaybeAtom());
 
   if (!maybe) {
     return raiseError("Empty string");
   }
 
   return maybe;
 }
 
-JS::Result<JSAtom*> BinASTTokenReaderMultipart::readMaybeIdentifierName() {
+JS::Result<JSAtom*> BinTokenReaderMultipart::readMaybeIdentifierName() {
   BINJS_MOZ_TRY_DECL(result, readMaybeAtom());
   if (result) {
     if (!IsIdentifier(result)) {
       return raiseError("Invalid identifier");
     }
   }
   return result;
 }
 
-JS::Result<JSAtom*> BinASTTokenReaderMultipart::readIdentifierName() {
+JS::Result<JSAtom*> BinTokenReaderMultipart::readIdentifierName() {
   BINJS_MOZ_TRY_DECL(result, readMaybeAtom());
   if (!IsIdentifier(result)) {
     return raiseError("Invalid identifier");
   }
   return result;
 }
 
-JS::Result<JSAtom*> BinASTTokenReaderMultipart::readMaybePropertyKey() {
+JS::Result<JSAtom*> BinTokenReaderMultipart::readMaybePropertyKey() {
   return readMaybeAtom();
 }
 
-JS::Result<JSAtom*> BinASTTokenReaderMultipart::readPropertyKey() {
+JS::Result<JSAtom*> BinTokenReaderMultipart::readPropertyKey() {
   return readAtom();
 }
 
-JS::Result<Ok> BinASTTokenReaderMultipart::readChars(Chars& out) {
+JS::Result<Ok> BinTokenReaderMultipart::readChars(Chars& out) {
   updateLatestKnownGood();
   BINJS_MOZ_TRY_DECL(index, readInternalUint32());
 
   if (index >= metadata_->numStrings()) {
     return raiseError("Invalid index to strings table for string enum");
   }
 
   out = metadata_->getSlice(index);
   return Ok();
 }
 
-JS::Result<BinASTVariant> BinASTTokenReaderMultipart::readVariant() {
+JS::Result<BinVariant> BinTokenReaderMultipart::readVariant() {
   updateLatestKnownGood();
   BINJS_MOZ_TRY_DECL(index, readInternalUint32());
 
   if (index >= metadata_->numStrings()) {
     return raiseError("Invalid index to strings table for string enum");
   }
 
   auto variantsPtr = variantsTable_.lookupForAdd(index);
@@ -335,126 +335,122 @@ JS::Result<BinASTVariant> BinASTTokenRea
 
   // Either we haven't cached the result yet or this is not a variant.
   // Check in the slices table and, in case of success, cache the result.
 
   // Note that we stop parsing if we attempt to readVariant() with an
   // ill-formed variant, so we don't run the risk of feching an ill-variant
   // more than once.
   Chars slice = metadata_->getSlice(index);  // We have checked `index` above.
-  BINJS_MOZ_TRY_DECL(variant,
-                     cx_->runtime()->binast().binASTVariant(cx_, slice));
+  BINJS_MOZ_TRY_DECL(variant, cx_->runtime()->binast().binVariant(cx_, slice));
 
   if (!variant) {
     return raiseError("Invalid string enum variant");
   }
 
   if (!variantsTable_.add(variantsPtr, index, *variant)) {
     return raiseOOM();
   }
 
   return *variant;
 }
 
-JS::Result<BinASTTokenReaderBase::SkippableSubTree>
-BinASTTokenReaderMultipart::readSkippableSubTree() {
+JS::Result<BinTokenReaderBase::SkippableSubTree>
+BinTokenReaderMultipart::readSkippableSubTree() {
   updateLatestKnownGood();
   BINJS_MOZ_TRY_DECL(byteLen, readInternalUint32());
 
   if (current_ + byteLen > stop_ || current_ + byteLen < current_) {
     return raiseError("Invalid byte length in readSkippableSubTree");
   }
 
   const auto start = offset();
 
   current_ += byteLen;
 
-  return BinASTTokenReaderBase::SkippableSubTree(start, byteLen);
+  return BinTokenReaderBase::SkippableSubTree(start, byteLen);
 }
 
 // Tagged tuples:
 // - uint32_t index in table [grammar];
 // - content (specified by the higher-level grammar);
-JS::Result<Ok> BinASTTokenReaderMultipart::enterTaggedTuple(
-    BinASTKind& tag, BinASTTokenReaderMultipart::BinASTFields&,
-    AutoTaggedTuple& guard) {
+JS::Result<Ok> BinTokenReaderMultipart::enterTaggedTuple(
+    BinKind& tag, BinTokenReaderMultipart::BinFields&, AutoTaggedTuple& guard) {
   BINJS_MOZ_TRY_DECL(index, readInternalUint32());
-  if (index >= metadata_->numBinASTKinds()) {
+  if (index >= metadata_->numBinKinds()) {
     return raiseError("Invalid index to grammar table");
   }
 
-  tag = metadata_->getBinASTKind(index);
+  tag = metadata_->getBinKind(index);
 
   // Enter the body.
   guard.init();
   return Ok();
 }
 
 // List:
 //
 // - uint32_t number of items;
 // - contents (specified by higher-level grammar);
 //
 // The total byte length of `number of items` + `contents` must be `byte
 // length`.
-JS::Result<Ok> BinASTTokenReaderMultipart::enterList(uint32_t& items,
-                                                     AutoList& guard) {
+JS::Result<Ok> BinTokenReaderMultipart::enterList(uint32_t& items,
+                                                  AutoList& guard) {
   guard.init();
 
   MOZ_TRY_VAR(items, readInternalUint32());
 
   return Ok();
 }
 
-void BinASTTokenReaderMultipart::AutoBase::init() { initialized_ = true; }
+void BinTokenReaderMultipart::AutoBase::init() { initialized_ = true; }
 
-BinASTTokenReaderMultipart::AutoBase::AutoBase(
-    BinASTTokenReaderMultipart& reader)
+BinTokenReaderMultipart::AutoBase::AutoBase(BinTokenReaderMultipart& reader)
     : initialized_(false), reader_(reader) {}
 
-BinASTTokenReaderMultipart::AutoBase::~AutoBase() {
+BinTokenReaderMultipart::AutoBase::~AutoBase() {
   // By now, the `AutoBase` must have been deinitialized by calling `done()`.
   // The only case in which we can accept not calling `done()` is if we have
   // bailed out because of an error.
   MOZ_ASSERT_IF(initialized_, reader_.hasRaisedError());
 }
 
-JS::Result<Ok> BinASTTokenReaderMultipart::AutoBase::checkPosition(
+JS::Result<Ok> BinTokenReaderMultipart::AutoBase::checkPosition(
     const uint8_t* expectedEnd) {
   if (reader_.current_ != expectedEnd) {
     return reader_.raiseError(
         "Caller did not consume the expected set of bytes");
   }
 
   return Ok();
 }
 
-BinASTTokenReaderMultipart::AutoList::AutoList(
-    BinASTTokenReaderMultipart& reader)
+BinTokenReaderMultipart::AutoList::AutoList(BinTokenReaderMultipart& reader)
     : AutoBase(reader) {}
 
-void BinASTTokenReaderMultipart::AutoList::init() { AutoBase::init(); }
+void BinTokenReaderMultipart::AutoList::init() { AutoBase::init(); }
 
-JS::Result<Ok> BinASTTokenReaderMultipart::AutoList::done() {
+JS::Result<Ok> BinTokenReaderMultipart::AutoList::done() {
   MOZ_ASSERT(initialized_);
   initialized_ = false;
   if (reader_.hasRaisedError()) {
     // Already errored, no need to check further.
     return reader_.cx_->alreadyReportedError();
   }
 
   return Ok();
 }
 
 // Internal uint32_t
 //
 // Encoded as variable length number.
 
 MOZ_MUST_USE JS::Result<uint32_t>
-BinASTTokenReaderMultipart::readInternalUint32() {
+BinTokenReaderMultipart::readInternalUint32() {
   uint32_t result = 0;
   uint32_t shift = 0;
   while (true) {
     MOZ_ASSERT(shift < 32);
     uint32_t byte;
     MOZ_TRY_VAR(byte, readByte());
 
     const uint32_t newResult = result | (byte >> 1) << shift;
@@ -470,21 +466,21 @@ BinASTTokenReaderMultipart::readInternal
     }
 
     if (shift >= 32) {
       return raiseError("Overflow during readInternalUint32");
     }
   }
 }
 
-BinASTTokenReaderMultipart::AutoTaggedTuple::AutoTaggedTuple(
-    BinASTTokenReaderMultipart& reader)
+BinTokenReaderMultipart::AutoTaggedTuple::AutoTaggedTuple(
+    BinTokenReaderMultipart& reader)
     : AutoBase(reader) {}
 
-JS::Result<Ok> BinASTTokenReaderMultipart::AutoTaggedTuple::done() {
+JS::Result<Ok> BinTokenReaderMultipart::AutoTaggedTuple::done() {
   MOZ_ASSERT(initialized_);
   initialized_ = false;
   if (reader_.hasRaisedError()) {
     // Already errored, no need to check further.
     return reader_.cx_->alreadyReportedError();
   }
 
   return Ok();
rename from js/src/frontend/BinASTTokenReaderMultipart.h
rename to js/src/frontend/BinTokenReaderMultipart.h
--- a/js/src/frontend/BinASTTokenReaderMultipart.h
+++ b/js/src/frontend/BinTokenReaderMultipart.h
@@ -1,22 +1,22 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef frontend_BinASTTokenReaderMultipart_h
-#define frontend_BinASTTokenReaderMultipart_h
+#ifndef frontend_BinTokenReaderMultipart_h
+#define frontend_BinTokenReaderMultipart_h
 
 #include "mozilla/Maybe.h"
 
-#include "frontend/BinASTRuntimeSupport.h"
-#include "frontend/BinASTToken.h"
-#include "frontend/BinASTTokenReaderBase.h"
+#include "frontend/BinSourceRuntimeSupport.h"
+#include "frontend/BinToken.h"
+#include "frontend/BinTokenReaderBase.h"
 
 #include "js/Result.h"
 
 namespace js {
 namespace frontend {
 
 /**
  * A token reader implementing the "multipart" serialization format for BinAST.
@@ -25,50 +25,49 @@ namespace frontend {
  * implementation of the BinAST compression suite, is designed to be
  * space- and time-efficient.
  *
  * As other token readers for the BinAST:
  *
  * - the reader does not support error recovery;
  * - the reader does not support lookahead or pushback.
  */
-class MOZ_STACK_CLASS BinASTTokenReaderMultipart
-    : public BinASTTokenReaderBase {
+class MOZ_STACK_CLASS BinTokenReaderMultipart : public BinTokenReaderBase {
  public:
   class AutoList;
   class AutoTaggedTuple;
 
   using CharSlice = BinaryASTSupport::CharSlice;
 
-  // This implementation of `BinASTFields` is effectively `void`, as the format
+  // This implementation of `BinFields` is effectively `void`, as the format
   // does not embed field information.
-  class BinASTFields {
+  class BinFields {
    public:
-    explicit BinASTFields(JSContext*) {}
+    explicit BinFields(JSContext*) {}
   };
   using Chars = CharSlice;
 
  public:
   /**
    * Construct a token reader.
    *
    * Does NOT copy the buffer.
    */
-  BinASTTokenReaderMultipart(JSContext* cx, ErrorReporter* er,
-                             const uint8_t* start, const size_t length);
+  BinTokenReaderMultipart(JSContext* cx, ErrorReporter* er,
+                          const uint8_t* start, const size_t length);
 
   /**
    * Construct a token reader.
    *
    * Does NOT copy the buffer.
    */
-  BinASTTokenReaderMultipart(JSContext* cx, ErrorReporter* er,
-                             const Vector<uint8_t>& chars);
+  BinTokenReaderMultipart(JSContext* cx, ErrorReporter* er,
+                          const Vector<uint8_t>& chars);
 
-  ~BinASTTokenReaderMultipart();
+  ~BinTokenReaderMultipart();
 
   /**
    * Read the header of the file.
    */
   MOZ_MUST_USE JS::Result<Ok> readHeader();
 
   // --- Primitive values.
   //
@@ -113,20 +112,20 @@ class MOZ_STACK_CLASS BinASTTokenReaderM
   /**
    * Read a single `string | null` value.
    *
    * MAY check if that string is not valid UTF-8.
    */
   MOZ_MUST_USE JS::Result<Ok> readChars(Chars&);
 
   /**
-   * Read a single `BinASTVariant | null` value.
+   * Read a single `BinVariant | null` value.
    */
-  MOZ_MUST_USE JS::Result<mozilla::Maybe<BinASTVariant>> readMaybeVariant();
-  MOZ_MUST_USE JS::Result<BinASTVariant> readVariant();
+  MOZ_MUST_USE JS::Result<mozilla::Maybe<BinVariant>> readMaybeVariant();
+  MOZ_MUST_USE JS::Result<BinVariant> readVariant();
 
   /**
    * Read over a single `[Skippable]` subtree value.
    *
    * This does *not* attempt to parse the subtree itself. Rather, the
    * returned `SkippableSubTree` contains the necessary information
    * to parse/tokenize the subtree at a later stage
    */
@@ -166,48 +165,47 @@ class MOZ_STACK_CLASS BinASTTokenReaderM
    * exactly all the bytes from that tuple. The `guard` MUST therefore be
    * destroyed at the point where the caller has reached the end of the tuple.
    * If the caller has consumed too few/too many bytes, this will be reported
    * in the call go `guard.done()`.
    *
    * @return out If the header of the tuple is invalid.
    */
   MOZ_MUST_USE JS::Result<Ok> enterTaggedTuple(
-      BinASTKind& tag, BinASTTokenReaderMultipart::BinASTFields& fields,
+      BinKind& tag, BinTokenReaderMultipart::BinFields& fields,
       AutoTaggedTuple& guard);
 
   /**
    * Read a single unsigned long.
    */
   MOZ_MUST_USE JS::Result<uint32_t> readUnsignedLong() {
     return readInternalUint32();
   }
 
  private:
   /**
    * Read a single uint32_t.
    */
   MOZ_MUST_USE JS::Result<uint32_t> readInternalUint32();
 
  private:
-  // A mapping string index => BinASTVariant as extracted from the [STRINGS]
+  // A mapping string index => BinVariant as extracted from the [STRINGS]
   // section of the file. Populated lazily.
-  js::HashMap<uint32_t, BinASTVariant, DefaultHasher<uint32_t>,
-              SystemAllocPolicy>
+  js::HashMap<uint32_t, BinVariant, DefaultHasher<uint32_t>, SystemAllocPolicy>
       variantsTable_;
 
   enum class MetadataOwnership { Owned, Unowned };
   MetadataOwnership metadataOwned_;
   BinASTSourceMetadata* metadata_;
 
   const uint8_t* posBeforeTree_;
 
-  BinASTTokenReaderMultipart(const BinASTTokenReaderMultipart&) = delete;
-  BinASTTokenReaderMultipart(BinASTTokenReaderMultipart&&) = delete;
-  BinASTTokenReaderMultipart& operator=(BinASTTokenReaderMultipart&) = delete;
+  BinTokenReaderMultipart(const BinTokenReaderMultipart&) = delete;
+  BinTokenReaderMultipart(BinTokenReaderMultipart&&) = delete;
+  BinTokenReaderMultipart& operator=(BinTokenReaderMultipart&) = delete;
 
  public:
   void traceMetadata(JSTracer* trc);
   BinASTSourceMetadata* takeMetadata();
   MOZ_MUST_USE JS::Result<Ok> initFromScriptSource(ScriptSource* scriptSource);
 
  public:
   // The following classes are used whenever we encounter a tuple/tagged
@@ -221,48 +219,48 @@ class MOZ_STACK_CLASS BinASTTokenReaderM
   //
   // In either case, the caller MUST call method `done()` of the guard once
   // it is done reading the tuple/tagged tuple/list, to report any pending
   // error.
 
   // Base class used by other Auto* classes.
   class MOZ_STACK_CLASS AutoBase {
    protected:
-    explicit AutoBase(BinASTTokenReaderMultipart& reader);
+    explicit AutoBase(BinTokenReaderMultipart& reader);
     ~AutoBase();
 
     // Raise an error if we are not in the expected position.
     MOZ_MUST_USE JS::Result<Ok> checkPosition(const uint8_t* expectedPosition);
 
-    friend BinASTTokenReaderMultipart;
+    friend BinTokenReaderMultipart;
     void init();
 
     // Set to `true` if `init()` has been called. Reset to `false` once
     // all conditions have been checked.
     bool initialized_;
-    BinASTTokenReaderMultipart& reader_;
+    BinTokenReaderMultipart& reader_;
   };
 
   // Guard class used to ensure that `enterList` is used properly.
   class MOZ_STACK_CLASS AutoList : public AutoBase {
    public:
-    explicit AutoList(BinASTTokenReaderMultipart& reader);
+    explicit AutoList(BinTokenReaderMultipart& reader);
 
     // Check that we have properly read to the end of the list.
     MOZ_MUST_USE JS::Result<Ok> done();
 
    protected:
-    friend BinASTTokenReaderMultipart;
+    friend BinTokenReaderMultipart;
     void init();
   };
 
   // Guard class used to ensure that `enterTaggedTuple` is used properly.
   class MOZ_STACK_CLASS AutoTaggedTuple : public AutoBase {
    public:
-    explicit AutoTaggedTuple(BinASTTokenReaderMultipart& reader);
+    explicit AutoTaggedTuple(BinTokenReaderMultipart& reader);
 
     // Check that we have properly read to the end of the tuple.
     MOZ_MUST_USE JS::Result<Ok> done();
   };
 
   // Compare a `Chars` and a string literal (ONLY a string literal).
   template <size_t N>
   static bool equals(const Chars& left, const char (&right)[N]) {
@@ -275,26 +273,26 @@ class MOZ_STACK_CLASS BinASTTokenReaderM
     if (!std::equal(left.start_, left.start_ + left.byteLen_, right)) {
       return false;
     }
 
     return true;
   }
 
   template <size_t N>
-  static JS::Result<Ok, JS::Error&> checkFields(
-      const BinASTKind kind, const BinASTFields& actual,
-      const BinASTField (&expected)[N]) {
+  static JS::Result<Ok, JS::Error&> checkFields(const BinKind kind,
+                                                const BinFields& actual,
+                                                const BinField (&expected)[N]) {
     // Not implemented in this tokenizer.
     return Ok();
   }
 
-  static JS::Result<Ok, JS::Error&> checkFields0(const BinASTKind kind,
-                                                 const BinASTFields& actual) {
+  static JS::Result<Ok, JS::Error&> checkFields0(const BinKind kind,
+                                                 const BinFields& actual) {
     // Not implemented in this tokenizer.
     return Ok();
   }
 };
 
 }  // namespace frontend
 }  // namespace js
 
-#endif  // frontend_BinASTTokenReaderMultipart_h
+#endif  // frontend_BinTokenReaderMultipart_h
--- a/js/src/frontend/BytecodeCompiler.cpp
+++ b/js/src/frontend/BytecodeCompiler.cpp
@@ -761,18 +761,18 @@ JSScript* frontend::CompileGlobalBinASTS
   if (!script) {
     return nullptr;
   }
 
   Directives directives(options.strictOption);
   GlobalSharedContext globalsc(cx, ScopeKind::Global, directives,
                                options.extraWarningsOption);
 
-  frontend::BinASTParser<BinASTTokenReaderMultipart> parser(
-      cx, alloc, usedNames, options, sourceObj);
+  frontend::BinASTParser<BinTokenReaderMultipart> parser(cx, alloc, usedNames,
+                                                         options, sourceObj);
 
   // Metadata stores internal pointers, so we must use the same buffer every
   // time, including for lazy parses
   ScriptSource* ss = sourceObj->source();
   BinASTSourceMetadata* metadata = nullptr;
   auto parsed =
       parser.parse(&globalsc, ss->binASTSource(), ss->length(), &metadata);
 
@@ -1052,17 +1052,17 @@ bool frontend::CompileLazyBinASTFunction
   if (!script) {
     return false;
   }
 
   if (lazy->hasBeenCloned()) {
     script->setHasBeenCloned();
   }
 
-  frontend::BinASTParser<BinASTTokenReaderMultipart> parser(
+  frontend::BinASTParser<BinTokenReaderMultipart> parser(
       cx, cx->tempLifoAlloc(), usedNames, options, sourceObj, lazy);
 
   auto parsed =
       parser.parseLazyFunction(lazy->scriptSource(), lazy->sourceStart());
 
   if (parsed.isErr()) {
     return false;
   }
--- a/js/src/frontend/BytecodeCompiler.h
+++ b/js/src/frontend/BytecodeCompiler.h
@@ -55,17 +55,17 @@
  * ParseContext.h: class UsedNameTracker: Track which bindings are used in which
  * scopes. This helps determine which bindings are closed-over, which affects
  * how they're stored; and whether special bindings like `this` and `arguments`
  * can be optimized away.
  *
  * ParseContext.h: class ParseContext: Extremely complex class that serves a lot
  * of purposes, but it's a single class - essentially no derived classes - so
  * it's a little easier to comprehend all at once. (SourceParseContext and
- * BinASTParseContext do derive from ParseContext, but they do nothing except
+ * BinParseContext do derive from ParseContext, but they do nothing except
  * adjust the constructor's arguments).
  * Note it uses a thing called Nestable, which implements a stack of objects:
  * you can push (and pop) instances to a stack (linked list) as you parse
  * further into the parse tree. You may push to this stack via calling the
  * constructor with a GeneralParser as an argument (usually `this`), which
  * pushes itself onto `this->pc` (so it does get assigned/pushed, even though no
  * assignment ever appears directly in the parser)
  *
rename from js/src/frontend/binast/Cargo.toml
rename to js/src/frontend/binsource/Cargo.toml
--- a/js/src/frontend/binast/Cargo.toml
+++ b/js/src/frontend/binsource/Cargo.toml
@@ -9,10 +9,10 @@ binjs_meta = "^0.4.3"
 clap = "^2"
 env_logger = "^0.5.6"
 itertools = "^0.7.6"
 log = "0.4"
 yaml-rust = "^0.4.2"
 webidl = "^0.8"
 
 [[bin]]
-name = "binast"
+name = "binsource"
 path = "src/main.rs"
rename from js/src/frontend/binast/README.md
rename to js/src/frontend/binsource/README.md
--- a/js/src/frontend/binast/README.md
+++ b/js/src/frontend/binsource/README.md
@@ -1,16 +1,16 @@
 A parser generator used to generate the following files:
 
-- js/src/frontend/BinASTParser.h
-- js/src/frontend/BinASTParser.cpp
-- js/src/frontent/BinASTToken.h
+- js/src/frontend/BinSource-auto.h
+- js/src/frontend/BinSource-auto.cpp
+- js/src/frontent/BinToken.h
 
 from the following files:
 
-- js/src/frontend/BinAST.webidl_ (specifications of BinAST)
-- js/src/frontend/BinAST.yaml (parser generator driver)
+- js/src/frontend/BinSource.webidl_ (specifications of BinAST)
+- js/src/frontend/BinSource.yaml (parser generator driver)
 
 To use it:
 ```sh
-$ cd $(topsrcdir)/js/src/frontend/binast
+$ cd $(topsrcdir)/js/src/frontend/binsource
 % ./build.sh
 ```
rename from js/src/frontend/binast/build.sh
rename to js/src/frontend/binsource/build.sh
--- a/js/src/frontend/binast/build.sh
+++ b/js/src/frontend/binsource/build.sh
@@ -1,25 +1,25 @@
 #!/bin/sh
 
 cargo run -- \
-      ../BinAST.webidl_ \
-      ../BinAST.yaml \
+      ../BinSource.webidl_ \
+      ../BinSource.yaml \
       --out-class ../BinASTParser-tmp.h    \
       --out-impl ../BinASTParser-tmp.cpp   \
       --out-enum ../BinASTEnum-tmp.h    \
-      --out-token ../BinASTToken-tmp.h
+      --out-token ../BinToken-tmp.h
 
 MACH=../../../../mach
 
 ${MACH} clang-format --path \
         ../BinASTParser-tmp.h \
         ../BinASTParser-tmp.cpp \
         ../BinASTEnum-tmp.h \
-        ../BinASTToken-tmp.h
+        ../BinToken-tmp.h
 
 # Usage: update SRC DST
 #
 # If SRC file and DST file have different content, move SRC file to DST file.
 # If not, remove SRC file.
 update() {
   SRC=$1
   DST=$2
@@ -31,9 +31,9 @@ update() {
       echo "UPDATED: ${DST} was modified"
       mv ${SRC} ${DST}
   fi
 }
 
 update ../BinASTParser-tmp.h ../BinASTParser.h
 update ../BinASTParser-tmp.cpp ../BinASTParser.cpp
 update ../BinASTEnum-tmp.h ../BinASTEnum.h
-update ../BinASTToken-tmp.h ../BinASTToken.h
+update ../BinToken-tmp.h ../BinToken.h
rename from js/src/frontend/binast/moz.build
rename to js/src/frontend/binsource/moz.build
--- a/js/src/frontend/binast/moz.build
+++ b/js/src/frontend/binsource/moz.build
@@ -1,7 +1,7 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-HOST_RUST_PROGRAMS += ['binast']
+HOST_RUST_PROGRAMS += ['binsource']
rename from js/src/frontend/binast/src/main.rs
rename to js/src/frontend/binsource/src/main.rs
--- a/js/src/frontend/binast/src/main.rs
+++ b/js/src/frontend/binsource/src/main.rs
@@ -157,23 +157,23 @@ struct GlobalRules {
     /// Header to add at the start of the .hpp file.
     /// defining the tokens.
     hpp_tokens_header: Option<String>,
 
     /// Footer to add at the start of the .hpp file.
     /// defining the tokens.
     hpp_tokens_footer: Option<String>,
 
-    /// Documentation for the `BinASTKind` class enum.
+    /// Documentation for the `BinKind` class enum.
     hpp_tokens_kind_doc: Option<String>,
 
-    /// Documentation for the `BinASTField` class enum.
+    /// Documentation for the `BinField` class enum.
     hpp_tokens_field_doc: Option<String>,
 
-    /// Documentation for the `BinASTVariant` class enum.
+    /// Documentation for the `BinVariant` class enum.
     hpp_tokens_variants_doc: Option<String>,
 
     /// Per-node rules.
     per_node: HashMap<NodeName, NodeRules>,
 }
 impl GlobalRules {
     fn new(syntax: &Spec, yaml: &yaml_rust::yaml::Yaml) -> Self {
         let rules = yaml.as_hash()
@@ -527,17 +527,17 @@ enum MethodCallKind {
     Var,
 
     /// Always use MOZ_TRY_VAR regardless of the result type.
     AlwaysVar,
 }
 
 /// Fixed parameter of interface method.
 const INTERFACE_PARAMS: &str =
-    "const size_t start, const BinASTKind kind, const BinASTFields& fields";
+    "const size_t start, const BinKind kind, const BinFields& fields";
 
 /// Fixed arguments of interface method.
 const INTERFACE_ARGS: &str =
     "start, kind, fields";
 
 /// The name of the toplevel interface for the script.
 const TOPLEVEL_INTERFACE: &str =
     "Program";
@@ -555,17 +555,17 @@ struct CPPExporter {
 
     /// All parsers of lists.
     list_parsers_to_generate: Vec<ListParserData>,
 
     /// All parsers of options.
     option_parsers_to_generate: Vec<OptionParserData>,
 
     /// A mapping from symbol (e.g. `+`, `-`, `instanceof`, ...) to the
-    /// name of the symbol as part of `enum class BinASTVariant`
+    /// name of the symbol as part of `enum class BinVariant`
     /// (e.g. `UnaryOperatorDelete`).
     variants_by_symbol: HashMap<String, String>,
 
     // A map from enum class names to the type.
     enum_types: HashMap<NodeName, Rc<String>>,
 }
 
 impl CPPExporter {
@@ -596,17 +596,17 @@ impl CPPExporter {
                     supports_empty: *supports_empty,
                     elements: content_node_name
                 });
             }
         }
         list_parsers_to_generate.sort_by(|a, b| str::cmp(a.name.to_str(), b.name.to_str()));
         option_parsers_to_generate.sort_by(|a, b| str::cmp(a.name.to_str(), b.name.to_str()));
 
-        // Prepare variant_by_symbol, which will let us lookup the BinASTVariant name of
+        // Prepare variant_by_symbol, which will let us lookup the BinVariant name of
         // a symbol. Since some symbols can appear in several enums (e.g. "+"
         // is both a unary and a binary operator), we need to collect all the
         // string enums that contain each symbol and come up with a unique name
         // (note that there is no guarantee of unicity – if collisions show up,
         // we may need to tweak the name generation algorithm).
         let mut enum_by_string : HashMap<String, Vec<NodeName>> = HashMap::new();
         let mut enum_types : HashMap<NodeName, Rc<String>> = HashMap::new();
         for (name, enum_) in syntax.string_enums_by_name().iter() {
@@ -939,47 +939,47 @@ impl CPPExporter {
         let kind_limit = node_names.len();
         buffer.push_str(&format!("\n#define FOR_EACH_BIN_KIND(F) \\\n{nodes}\n",
             nodes = node_names.iter()
                 .map(|name| format!("    F({enum_name}, \"{spec_name}\")",
                     enum_name = name.to_cpp_enum_case(),
                     spec_name = name))
                 .format(" \\\n")));
         buffer.push_str("
-enum class BinASTKind {
+enum class BinKind {
 #define EMIT_ENUM(name, _) name,
     FOR_EACH_BIN_KIND(EMIT_ENUM)
 #undef EMIT_ENUM
 };
 ");
 
-        buffer.push_str(&format!("\n// The number of distinct values of BinASTKind.\nconst size_t BINASTKIND_LIMIT = {};\n\n\n", kind_limit));
+        buffer.push_str(&format!("\n// The number of distinct values of BinKind.\nconst size_t BINKIND_LIMIT = {};\n\n\n", kind_limit));
         buffer.push_str("\n\n");
         if self.rules.hpp_tokens_field_doc.is_some() {
             buffer.push_str(&self.rules.hpp_tokens_field_doc.reindent(""));
         }
 
         let field_names = self.syntax.field_names()
             .keys()
             .sorted();
         let field_limit = field_names.len();
         buffer.push_str(&format!("\n#define FOR_EACH_BIN_FIELD(F) \\\n{nodes}\n",
             nodes = field_names.iter()
                 .map(|name| format!("    F({enum_name}, \"{spec_name}\")",
                     spec_name = name,
                     enum_name = name.to_cpp_enum_case()))
                 .format(" \\\n")));
         buffer.push_str("
-enum class BinASTField {
+enum class BinField {
 #define EMIT_ENUM(name, _) name,
     FOR_EACH_BIN_FIELD(EMIT_ENUM)
 #undef EMIT_ENUM
 };
 ");
-        buffer.push_str(&format!("\n// The number of distinct values of BinASTField.\nconst size_t BINASTFIELD_LIMIT = {};\n\n\n", field_limit));
+        buffer.push_str(&format!("\n// The number of distinct values of BinField.\nconst size_t BINFIELD_LIMIT = {};\n\n\n", field_limit));
 
         if self.rules.hpp_tokens_variants_doc.is_some() {
             buffer.push_str(&self.rules.hpp_tokens_variants_doc.reindent(""));
         }
         let enum_variants : Vec<_> = self.variants_by_symbol
             .iter()
             .sorted_by(|&(ref symbol_1, ref name_1), &(ref symbol_2, ref name_2)| {
                 Ord::cmp(name_1, name_2)
@@ -990,23 +990,23 @@ enum class BinASTField {
         buffer.push_str(&format!("\n#define FOR_EACH_BIN_VARIANT(F) \\\n{nodes}\n",
             nodes = enum_variants.into_iter()
                 .map(|(symbol, name)| format!("    F({variant_name}, \"{spec_name}\")",
                     spec_name = symbol,
                     variant_name = name))
                 .format(" \\\n")));
 
         buffer.push_str("
-enum class BinASTVariant {
+enum class BinVariant {
 #define EMIT_ENUM(name, _) name,
     FOR_EACH_BIN_VARIANT(EMIT_ENUM)
 #undef EMIT_ENUM
 };
 ");
-        buffer.push_str(&format!("\n// The number of distinct values of BinASTVariant.\nconst size_t BINASTVARIANT_LIMIT = {};\n\n\n",
+        buffer.push_str(&format!("\n// The number of distinct values of BinVariant.\nconst size_t BINVARIANT_LIMIT = {};\n\n\n",
             variants_limit));
 
         buffer.push_str(&self.rules.hpp_tokens_footer.reindent(""));
         buffer.push_str("\n");
     }
 
     /// Declare string enums
     fn export_declare_string_enums(&self, buffer: &mut String) {
@@ -1238,18 +1238,18 @@ impl CPPExporter {
                 nodes = nodes.iter()
                     .format("\n    "),
                 name = name.to_str());
 
             // Generate outer method
             buffer.push_str(&format!("{bnf}
 {first_line}
 {{
-    BinASTKind kind;
-    BinASTFields fields(cx_);
+    BinKind kind;
+    BinFields fields(cx_);
     AutoTaggedTuple guard(*tokenizer_);
     const auto start = tokenizer_->offset();
 
     MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
 
 {call}
 
     MOZ_TRY(guard.done());
@@ -1275,24 +1275,24 @@ impl CPPExporter {
         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 BinASTKind::{variant_name}:
+      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 BinASTKind::{variant_name}:
+      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(),
@@ -1453,25 +1453,25 @@ impl CPPExporter {
             } else {
                 panic!("Internal error: In {}, there should be a type with that name",
                     parser.name.to_str());
             };
         match named_implementation {
             NamedType::Interface(_) => {
                 buffer.push_str(&format!("{first_line}
 {{
-    BinASTKind kind;
-    BinASTFields fields(cx_);
+    BinKind kind;
+    BinFields fields(cx_);
     AutoTaggedTuple guard(*tokenizer_);
 
     MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
     {type_ok} result;
-    if (kind == BinASTKind::{null}) {{
+    if (kind == BinKind::{null}) {{
 {none_block}
-    }} else if (kind == BinASTKind::{kind}) {{
+    }} else if (kind == BinKind::{kind}) {{
         const auto start = tokenizer_->offset();
 {before}{call}{after}
     }} else {{
         return raiseInvalidKind(\"{kind}\", kind);
     }}
     MOZ_TRY(guard.done());
 
     return result;
@@ -1506,23 +1506,23 @@ impl CPPExporter {
                     kind = parser.elements.to_cpp_enum_case(),
                 ));
             }
             NamedType::Typedef(ref type_) => {
                 match type_.spec() {
                     &TypeSpec::TypeSum(_) => {
                 buffer.push_str(&format!("{first_line}
 {{
-    BinASTKind kind;
-    BinASTFields fields(cx_);
+    BinKind kind;
+    BinFields fields(cx_);
     AutoTaggedTuple guard(*tokenizer_);
 
     MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
     {type_ok} result;
-    if (kind == BinASTKind::{null}) {{
+    if (kind == BinKind::{null}) {{
 {none_block}
     }} else {{
         const auto start = tokenizer_->offset();
 {before}{call}{after}
     }}
     MOZ_TRY(guard.done());
 
     return result;
@@ -1668,22 +1668,22 @@ impl CPPExporter {
         if self.refgraph.is_used(name.to_rc_string().clone()) {
             // Generate comments
             let comment = format!("\n/*\n{}*/\n", ToWebidl::interface(interface, "", "    "));
             buffer.push_str(&comment);
 
             // Generate public method
             buffer.push_str(&format!("{first_line}
 {{
-    BinASTKind kind;
-    BinASTFields fields(cx_);
+    BinKind kind;
+    BinFields fields(cx_);
     AutoTaggedTuple guard(*tokenizer_);
 
     MOZ_TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    if (kind != BinASTKind::{kind}) {{
+    if (kind != BinKind::{kind}) {{
         return raiseInvalidKind(\"{kind}\", kind);
     }}
     const auto start = tokenizer_->offset();
 {call}
     MOZ_TRY(guard.done());
 
     return result;
 }}
@@ -1709,17 +1709,17 @@ impl CPPExporter {
         let number_of_fields = interface.contents().fields().len();
         let first_line = self.get_method_definition_start(name, inner_prefix,
                                                           INTERFACE_PARAMS,
                                                           &extra_params);
 
         let fields_type_list = format!("{{ {} }}", interface.contents()
             .fields()
             .iter()
-            .map(|field| format!("BinASTField::{}", field.name().to_cpp_enum_case()))
+            .map(|field| format!("BinField::{}", field.name().to_cpp_enum_case()))
             .format(", "));
 
         let mut fields_implem = String::new();
         for field in interface.contents().fields() {
             let rules_for_this_field = rules_for_this_interface.by_field.get(field.name())
                 .cloned()
                 .unwrap_or_default();
             let needs_block = rules_for_this_field.block_before_field.is_some() || rules_for_this_field.block_after_field.is_some();
@@ -1750,17 +1750,17 @@ impl CPPExporter {
                         Some(format!("MOZ_TRY_VAR({var_name}, tokenizer_->readBool());", var_name = var_name)))
                     } else {
                         (None,
                         Some(format!("BINJS_MOZ_TRY_DECL({var_name}, tokenizer_->readBool());", var_name = var_name)))
                     }
                 }
                 Some(IsNullable { is_nullable: false, content: Primitive::Offset }) => {
                     if needs_block {
-                        (Some(format!("BinASTTokenReaderBase::SkippableSubTree {var_name};", var_name = var_name)),
+                        (Some(format!("BinTokenReaderBase::SkippableSubTree {var_name};", var_name = var_name)),
                         Some(format!("MOZ_TRY_VAR({var_name}, tokenizer_->readSkippableSubTree());", var_name = var_name)))
                     } else {
                         (None,
                         Some(format!("BINJS_MOZ_TRY_DECL({var_name}, tokenizer_->readSkippableSubTree());", var_name = var_name)))
                     }
                 }
                 Some(IsNullable { content: Primitive::Void, .. }) => {
                     warn!("Internal error: We shouldn't have any `void` types at this stage.");
@@ -1876,25 +1876,25 @@ impl CPPExporter {
             ));
         } else {
             let check_fields = if number_of_fields == 0 {
                 format!("MOZ_TRY(tokenizer_->checkFields0(kind, fields));")
             } else {
                 // The following strategy is designed for old versions of clang.
                 format!("
 #if defined(DEBUG)
-    const BinASTField expected_fields[{number_of_fields}] = {fields_type_list};
+    const BinField expected_fields[{number_of_fields}] = {fields_type_list};
     MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif // defined(DEBUG)",
                     fields_type_list = fields_type_list,
                     number_of_fields = number_of_fields)
             };
             buffer.push_str(&format!("{first_line}
 {{
-    MOZ_ASSERT(kind == BinASTKind::{kind});
+    MOZ_ASSERT(kind == BinKind::{kind});
     BINJS_TRY(CheckRecursionLimit(cx_));
 {check_fields}
 {pre}{fields_implem}
 {post}    return result;
 }}
 
 ",
                 check_fields = check_fields,
@@ -1955,21 +1955,21 @@ impl CPPExporter {
 {cases}
       default:
         return raiseInvalidVariant(\"{kind}\", variant);
     }}",
                     kind = kind,
                     cases = enum_.strings()
                         .iter()
                         .map(|symbol| {
-                            format!("    case BinASTVariant::{binastvariant_variant}:
+                            format!("    case BinVariant::{binvariant_variant}:
         return {kind}::{specialized_variant};",
                                 kind = kind,
                                 specialized_variant = symbol.to_cpp_enum_case(),
-                                binastvariant_variant  = self.variants_by_symbol.get(symbol)
+                                binvariant_variant  = self.variants_by_symbol.get(symbol)
                                     .unwrap()
                             )
                         })
                         .format("\n")
                 );
 
                 let rendered_doc = format!("/*\nenum {kind} {{\n{cases}\n}};\n*/\n",
                     kind = kind,
rename from js/src/frontend/binast/src/refgraph.rs
rename to js/src/frontend/binsource/src/refgraph.rs
--- a/js/src/frontend/moz.build
+++ b/js/src/frontend/moz.build
@@ -67,28 +67,28 @@ if CONFIG['JS_BUILD_BINAST']:
     # Using SOURCES, as UNIFIED_SOURCES causes mysterious bugs on 32-bit
     # platforms.
 
     # These parts of BinAST should eventually move to release.
     SOURCES += [
         'BinASTParser.cpp',
         'BinASTParserBase.cpp',
         'BinASTParserPerTokenizer.cpp',
-        'BinASTRuntimeSupport.cpp',
-        'BinASTToken.cpp',
-        'BinASTTokenReaderBase.cpp',
-        'BinASTTokenReaderMultipart.cpp',
+        'BinSourceRuntimeSupport.cpp',
+        'BinToken.cpp',
+        'BinTokenReaderBase.cpp',
+        'BinTokenReaderMultipart.cpp',
     ]
 
     DIRS += [
-        'binast'
+        'binsource'
     ]
 
     # Instrument BinAST files for fuzzing as we have a fuzzing target for BinAST.
     if CONFIG['FUZZING_INTERFACES'] and CONFIG['LIBFUZZER']:
         include('/tools/fuzzing/libfuzzer-flags.mozbuild')
 
         SOURCES['BinASTParser.cpp'].flags += libfuzzer_flags
         SOURCES['BinASTParserBase.cpp'].flags += libfuzzer_flags
         SOURCES['BinASTParserPerTokenizer.cpp'].flags += libfuzzer_flags
-        SOURCES['BinASTToken.cpp'].flags += libfuzzer_flags
-        SOURCES['BinASTTokenReaderBase.cpp'].flags += libfuzzer_flags
-        SOURCES['BinASTTokenReaderMultipart.cpp'].flags += libfuzzer_flags
+        SOURCES['BinToken.cpp'].flags += libfuzzer_flags
+        SOURCES['BinTokenReaderBase.cpp'].flags += libfuzzer_flags
+        SOURCES['BinTokenReaderMultipart.cpp'].flags += libfuzzer_flags
--- a/js/src/jsapi-tests/testBinASTReader.cpp
+++ b/js/src/jsapi-tests/testBinASTReader.cpp
@@ -454,17 +454,17 @@ void runTestFromPath(JSContext* cx, cons
   if (closedir(dir) != 0) {
     MOZ_CRASH("Could not close dir");
   }
 #endif  // defined(XP_WIN)
 }
 
 BEGIN_TEST(testBinASTReaderMultipartECMAScript2) {
 #if defined(XP_WIN)
-  runTestFromPath<js::frontend::BinASTTokenReaderMultipart>(
+  runTestFromPath<js::frontend::BinTokenReaderMultipart>(
       cx, "jsapi-tests\\binast\\parser\\multipart\\");
 #else
-  runTestFromPath<js::frontend::BinASTTokenReaderMultipart>(
+  runTestFromPath<js::frontend::BinTokenReaderMultipart>(
       cx, "jsapi-tests/binast/parser/multipart/");
 #endif  // defined(XP_XIN)
   return true;
 }
 END_TEST(testBinASTReaderMultipartECMAScript2)
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -80,17 +80,17 @@
 #include "gc/PublicIterators.h"
 #include "jit/arm/Simulator-arm.h"
 #include "jit/InlinableNatives.h"
 #include "jit/Ion.h"
 #include "jit/JitcodeMap.h"
 #include "jit/JitRealm.h"
 #include "jit/shared/CodeGenerator-shared.h"
 #include "js/ArrayBuffer.h"  // JS::{CreateMappedArrayBufferContents,NewMappedArrayBufferWithContents,IsArrayBufferObject,GetArrayBufferLengthAndData}
-#include "js/BuildId.h"      // JS::BuildIdCharVector, JS::SetProcessBuildIdOp
+#include "js/BuildId.h"  // JS::BuildIdCharVector, JS::SetProcessBuildIdOp
 #include "js/CharacterEncoding.h"
 #include "js/CompilationAndEvaluation.h"
 #include "js/CompileOptions.h"
 #include "js/ContextOptions.h"  // JS::ContextOptions{,Ref}
 #include "js/Debug.h"
 #include "js/Equality.h"  // JS::SameValue
 #include "js/GCVector.h"
 #include "js/Initialization.h"
@@ -5104,17 +5104,17 @@ static bool BinParse(JSContext* cx, unsi
       cx, frontend::CreateScriptSourceObject(cx, options, Nothing()));
   if (!sourceObj) {
     return false;
   }
 
   Directives directives(false);
   GlobalSharedContext globalsc(cx, ScopeKind::Global, directives, false);
 
-  auto parseFunc = ParseBinASTData<frontend::BinASTTokenReaderMultipart>;
+  auto parseFunc = ParseBinASTData<frontend::BinTokenReaderMultipart>;
   if (!parseFunc(cx, buf_data, buf_length, &globalsc, usedNames, options,
                  sourceObj)) {
     return false;
   }
 
   args.rval().setUndefined();
   return true;
 }
@@ -10884,18 +10884,17 @@ int main(int argc, char** argv, char** e
           "Choose to enable a subset of the wasm compilers (valid options are "
           "none/baseline/ion/cranelift/baseline+ion/baseline+cranelift)") ||
       !op.addBoolOption('\0', "wasm-verbose",
                         "Enable WebAssembly verbose logging") ||
       !op.addBoolOption('\0', "test-wasm-await-tier2",
                         "Forcibly activate tiering and block "
                         "instantiation on completion of tier2")
 #ifdef ENABLE_WASM_GC
-      ||
-      !op.addBoolOption('\0', "wasm-gc", "Enable experimental wasm GC features")
+      || !op.addBoolOption('\0', "wasm-gc", "Enable experimental wasm GC features")
 #else
       || !op.addBoolOption('\0', "wasm-gc", "No-op")
 #endif
       || !op.addBoolOption('\0', "no-native-regexp",
                            "Disable native regexp compilation") ||
       !op.addBoolOption('\0', "no-unboxed-objects",
                         "Disable creating unboxed plain objects") ||
       !op.addBoolOption('\0', "enable-streams",
--- a/js/src/vm/JSScript.cpp
+++ b/js/src/vm/JSScript.cpp
@@ -2626,42 +2626,41 @@ XDRResult ScriptSource::XDR(XDRState<mod
     }
 
     uint8_t hasMetadata = !!ss->binASTMetadata_;
     MOZ_TRY(xdr->codeUint8(&hasMetadata));
     if (hasMetadata) {
 #if defined(JS_BUILD_BINAST)
       UniquePtr<frontend::BinASTSourceMetadata>& binASTMetadata =
           ss->binASTMetadata_;
-      uint32_t numBinASTKinds;
+      uint32_t numBinKinds;
       uint32_t numStrings;
       if (mode == XDR_ENCODE) {
-        numBinASTKinds = binASTMetadata->numBinASTKinds();
+        numBinKinds = binASTMetadata->numBinKinds();
         numStrings = binASTMetadata->numStrings();
       }
-      MOZ_TRY(xdr->codeUint32(&numBinASTKinds));
+      MOZ_TRY(xdr->codeUint32(&numBinKinds));
       MOZ_TRY(xdr->codeUint32(&numStrings));
 
       if (mode == XDR_DECODE) {
         // Use calloc, since we're storing this immediately, and filling it
         // might GC, to avoid marking bogus atoms.
         auto metadata = static_cast<frontend::BinASTSourceMetadata*>(
-            js_calloc(frontend::BinASTSourceMetadata::totalSize(numBinASTKinds,
+            js_calloc(frontend::BinASTSourceMetadata::totalSize(numBinKinds,
                                                                 numStrings)));
         if (!metadata) {
           return xdr->fail(JS::TranscodeResult_Throw);
         }
-        new (metadata)
-            frontend::BinASTSourceMetadata(numBinASTKinds, numStrings);
+        new (metadata) frontend::BinASTSourceMetadata(numBinKinds, numStrings);
         ss->setBinASTSourceMetadata(metadata);
       }
 
-      for (uint32_t i = 0; i < numBinASTKinds; i++) {
-        frontend::BinASTKind* binASTKindBase = binASTMetadata->binASTKindBase();
-        MOZ_TRY(xdr->codeEnum32(&binASTKindBase[i]));
+      for (uint32_t i = 0; i < numBinKinds; i++) {
+        frontend::BinKind* binKindBase = binASTMetadata->binKindBase();
+        MOZ_TRY(xdr->codeEnum32(&binKindBase[i]));
       }
 
       RootedAtom atom(xdr->cx());
       JSAtom** atomsBase = binASTMetadata->atomsBase();
       auto slices = binASTMetadata->sliceBase();
       auto sourceBase = reinterpret_cast<const char*>(ss->binASTSource());
 
       for (uint32_t i = 0; i < numStrings; i++) {
--- a/js/src/vm/JSScript.h
+++ b/js/src/vm/JSScript.h
@@ -20,17 +20,17 @@
 #include "mozilla/Utf8.h"
 #include "mozilla/Variant.h"
 
 #include <type_traits>  // std::is_same
 #include <utility>      // std::move
 
 #include "jstypes.h"
 
-#include "frontend/BinASTRuntimeSupport.h"
+#include "frontend/BinSourceRuntimeSupport.h"
 #include "frontend/NameAnalysisTypes.h"
 #include "gc/Barrier.h"
 #include "gc/Rooting.h"
 #include "jit/IonCode.h"
 #include "js/CompileOptions.h"
 #include "js/UbiNode.h"
 #include "js/UniquePtr.h"
 #include "js/Utility.h"
--- a/js/src/vm/Runtime.h
+++ b/js/src/vm/Runtime.h
@@ -19,17 +19,17 @@
 #include "mozilla/Vector.h"
 
 #include <algorithm>
 #include <setjmp.h>
 
 #include "builtin/AtomicsObject.h"
 #include "builtin/intl/SharedIntlData.h"
 #include "builtin/Promise.h"
-#include "frontend/BinASTRuntimeSupport.h"
+#include "frontend/BinSourceRuntimeSupport.h"
 #include "frontend/NameCollections.h"
 #include "gc/GCRuntime.h"
 #include "gc/Tracer.h"
 #include "irregexp/RegExpStack.h"
 #include "js/BuildId.h"  // JS::BuildIdOp
 #include "js/Debug.h"
 #include "js/GCVector.h"
 #include "js/HashTable.h"