Bug 1528837 - Part 12: Rename BinASTParserBase::factory_ field to handler_. r=Yoric
authorTooru Fujisawa <arai_a@mac.com>
Sun, 24 Feb 2019 03:31:45 +0000
changeset 518659 21b0cdf00414e525501ffd9088d194b20591565f
parent 518658 e6f7bf4fc43d5ad9a89eb34a4d06fc4429d52c43
child 518660 f55920d58943e30d181614e0d4518f6c4489cd6f
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersYoric
bugs1528837
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1528837 - Part 12: Rename BinASTParserBase::factory_ field to handler_. r=Yoric Differential Revision: https://phabricator.services.mozilla.com/D20224
js/src/frontend/BinASTParser.cpp
js/src/frontend/BinASTParser.h
js/src/frontend/BinASTParserBase.cpp
js/src/frontend/BinASTParserBase.h
js/src/frontend/BinASTParserPerTokenizer.cpp
js/src/frontend/BinASTParserPerTokenizer.h
js/src/frontend/BinSource.yaml
--- a/js/src/frontend/BinASTParser.cpp
+++ b/js/src/frontend/BinASTParser.cpp
@@ -1759,17 +1759,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   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, factory_.newAssignment(ParseNodeKind::AssignExpr,
+  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 BinKind kind, const BinFields& fields) {
@@ -1784,17 +1784,17 @@ BinASTParser<Tok>::parseInterfaceAssignm
   RootedAtom name(cx_);
   MOZ_TRY_VAR(name, tokenizer_->readIdentifierName());
 
   if (!IsIdentifier(name)) {
     return raiseError("Invalid identifier");
   }
   BINJS_TRY(usedNames_.noteUse(cx_, name, pc_->scriptId(),
                                pc_->innermostScope()->id()));
-  BINJS_TRY_DECL(result, factory_.newName(name->asPropertyName(),
+  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 BinKind kind, const BinFields& fields) {
   return raiseError(
@@ -1900,17 +1900,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
   ParseNode* result;
   // ParseNodeKind::PowExpr is not left-associative
   if (left->isKind(pnk) && pnk != ParseNodeKind::PowExpr) {
     // Regroup left-associative operations into lists.
     left->template as<ListNode>().appendWithoutOrderAssumption(right);
     result = left;
   } else {
-    BINJS_TRY_DECL(list, factory_.newList(pnk, tokenizer_->pos(start)));
+    BINJS_TRY_DECL(list, handler_.newList(pnk, tokenizer_->pos(start)));
 
     list->appendWithoutOrderAssumption(left);
     list->appendWithoutOrderAssumption(right);
     result = list;
   }
   return result;
 }
 
@@ -1949,17 +1949,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 #endif  // defined(DEBUG)
 
   RootedAtom name(cx_);
   MOZ_TRY_VAR(name, tokenizer_->readIdentifierName());
 
   if (!IsIdentifier(name)) {
     return raiseError("Invalid identifier");
   }
-  BINJS_TRY_DECL(result, factory_.newName(name->asPropertyName(),
+  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 BinKind kind, const BinFields& fields) {
   return raiseError(
@@ -2005,17 +2005,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   BINJS_TRY(currentScope.init(pc_));
 
   MOZ_TRY(parseAssertedBlockScope());
 
   BINJS_MOZ_TRY_DECL(statements, parseListOfStatement());
 
   MOZ_TRY(checkClosedVars(currentScope));
   BINJS_TRY_DECL(bindings, NewLexicalScopeData(cx_, currentScope, alloc_, pc_));
-  BINJS_TRY_DECL(result, factory_.newLexicalScope(*bindings, statements));
+  BINJS_TRY_DECL(result, handler_.newLexicalScope(*bindings, statements));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceBreakStatement(
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::BreakStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -2041,17 +2041,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
         this->error(JSMSG_TOUGH_BREAK);
         return cx_->alreadyReportedError();
       case ParseContext::BreakStatementError::LabelNotFound:
         this->error(JSMSG_LABEL_NOT_FOUND);
         return cx_->alreadyReportedError();
     }
   }
 
-  BINJS_TRY_DECL(result, factory_.newBreakStatement(
+  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 BinKind kind, const BinFields& fields) {
@@ -2065,41 +2065,41 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
   BINJS_MOZ_TRY_DECL(callee, parseExpressionOrSuper());
 
   BINJS_MOZ_TRY_DECL(arguments, parseArguments());
 
   auto op = JSOP_CALL;
 
   // Try to optimize funcall and funapply at the bytecode level
-  if (PropertyName* prop = factory_.maybeDottedProperty(callee)) {
+  if (PropertyName* prop = handler_.maybeDottedProperty(callee)) {
     if (prop == cx_->names().apply) {
       op = JSOP_FUNAPPLY;
       if (pc_->isFunctionBox()) {
         pc_->functionBox()->usesApply = true;
       }
     } else if (prop == cx_->names().call) {
       op = JSOP_FUNCALL;
     }
   }
 
   // Check for direct calls to `eval`.
-  if (factory_.isEvalName(callee, cx_)) {
+  if (handler_.isEvalName(callee, cx_)) {
     if (!pc_->varScope().lookupDeclaredNameForAdd(cx_->names().eval) &&
         !pc_->innermostScope()->lookupDeclaredNameForAdd(cx_->names().eval)) {
       // This is a direct call to `eval`.
       if (!pc_->sc()->hasDirectEval()) {
         return raiseMissingDirectEvalInAssertedScope();
       }
 
       op = pc_->sc()->strict() ? JSOP_STRICTEVAL : JSOP_EVAL;
     }
   }
 
-  BINJS_TRY_DECL(result, factory_.newCall(callee, arguments));
+  BINJS_TRY_DECL(result, handler_.newCall(callee, arguments));
   result->setOp(op);
   return result;
 }
 
 /*
  interface CatchClause : Node {
     AssertedBoundNamesScope bindingScope;
     Binding binding;
@@ -2141,18 +2141,18 @@ JS::Result<LexicalScopeNode*> BinASTPars
   MOZ_TRY(parseAssertedBoundNamesScope());
 
   BINJS_MOZ_TRY_DECL(binding, parseBinding());
 
   BINJS_MOZ_TRY_DECL(body, parseBlock());
 
   MOZ_TRY(checkClosedVars(currentScope));
   BINJS_TRY_DECL(bindings, NewLexicalScopeData(cx_, currentScope, alloc_, pc_));
-  BINJS_TRY_DECL(result, factory_.newLexicalScope(*bindings, body));
-  BINJS_TRY(factory_.setupCatchScope(result, binding, body));
+  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 BinKind kind, const BinFields& fields) {
   return raiseError(
       "FIXME: Not implemented yet in this preview release (ClassDeclaration)");
@@ -2218,17 +2218,17 @@ BinASTParser<Tok>::parseInterfaceCompoun
       break;
     case CompoundAssignmentOperator::BitXorAssign:
       pnk = ParseNodeKind::BitXorAssignExpr;
       break;
     case CompoundAssignmentOperator::BitAndAssign:
       pnk = ParseNodeKind::BitAndAssignExpr;
       break;
   }
-  BINJS_TRY_DECL(result, factory_.newAssignment(pnk, binding, expression));
+  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 BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::ComputedMemberAssignmentTarget);
@@ -2238,17 +2238,17 @@ BinASTParser<Tok>::parseInterfaceCompute
   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, factory_.newPropertyByValue(object, expression,
+  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 BinKind kind, const BinFields& fields) {
@@ -2259,17 +2259,17 @@ BinASTParser<Tok>::parseInterfaceCompute
   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, factory_.newPropertyByValue(object, expression,
+  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 BinKind kind, const BinFields& fields) {
   return raiseError(
@@ -2290,17 +2290,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 #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, factory_.newConditional(test, consequent, alternate));
+  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 BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::ContinueStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -2326,17 +2326,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
         this->error(JSMSG_BAD_CONTINUE);
         return cx_->alreadyReportedError();
       case ParseContext::ContinueStatementError::LabelNotFound:
         this->error(JSMSG_LABEL_NOT_FOUND);
         return cx_->alreadyReportedError();
     }
   }
 
-  BINJS_TRY_DECL(result, factory_.newContinueStatement(
+  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 BinKind kind, const BinFields& fields) {
@@ -2347,27 +2347,27 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   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 (!factory_.isUsableAsObjectPropertyName(name)) {
+  if (!handler_.isUsableAsObjectPropertyName(name)) {
     return raiseError("DataProperty key kind");
   }
 
   ParseNode* result;
   if (name->template is<NameNode>() &&
       name->template as<NameNode>().atom() == cx_->names().proto) {
-    BINJS_TRY_VAR(result, factory_.newUnary(ParseNodeKind::MutateProto, start,
+    BINJS_TRY_VAR(result, handler_.newUnary(ParseNodeKind::MutateProto, start,
                                             expression));
   } else {
-    BINJS_TRY_VAR(result, factory_.newObjectMethodOrPropertyDefinition(
+    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 BinKind kind, const BinFields& fields) {
@@ -2407,17 +2407,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   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, factory_.newStringLiteral(rawValue, pos));
+  BINJS_TRY_DECL(result, handler_.newStringLiteral(rawValue, pos));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceDoWhileStatement(
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::DoWhileStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -2428,17 +2428,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 #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, factory_.newDoWhileStatement(body, test, tokenizer_->pos(start)));
+      result, handler_.newDoWhileStatement(body, test, tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceEagerArrowExpressionWithExpression(
     const size_t start, const BinKind kind, const BinFields& fields) {
   return raiseError(
@@ -2508,17 +2508,17 @@ BinASTParser<Tok>::parseInterfaceEagerFu
   ParseContext::Scope lexicalScope(cx_, pc_, usedNames_);
   BINJS_TRY(lexicalScope.init(pc_));
   ListNode* params;
   ListNode* body;
   MOZ_TRY(parseFunctionOrMethodContents(length, &params, &body));
   MOZ_TRY(prependDirectivesToBody(body, directives));
   BINJS_TRY_DECL(lexicalScopeData,
                  NewLexicalScopeData(cx_, lexicalScope, alloc_, pc_));
-  BINJS_TRY_DECL(bodyScope, factory_.newLexicalScope(*lexicalScopeData, body));
+  BINJS_TRY_DECL(bodyScope, handler_.newLexicalScope(*lexicalScopeData, body));
   BINJS_MOZ_TRY_DECL(
       result, buildFunction(start, kind, name, params, bodyScope, funbox));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceEagerFunctionExpression(
     const size_t start, const BinKind kind, const BinFields& fields) {
@@ -2571,17 +2571,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   ParseContext::Scope lexicalScope(cx_, pc_, usedNames_);
   BINJS_TRY(lexicalScope.init(pc_));
   ListNode* params;
   ListNode* body;
   MOZ_TRY(parseFunctionExpressionContents(length, &params, &body));
   MOZ_TRY(prependDirectivesToBody(body, directives));
   BINJS_TRY_DECL(lexicalScopeData,
                  NewLexicalScopeData(cx_, lexicalScope, alloc_, pc_));
-  BINJS_TRY_DECL(bodyScope, factory_.newLexicalScope(*lexicalScopeData, body));
+  BINJS_TRY_DECL(bodyScope, handler_.newLexicalScope(*lexicalScopeData, body));
   BINJS_MOZ_TRY_DECL(
       result, buildFunction(start, kind, name, params, bodyScope, funbox));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceEagerGetter(
     const size_t start, const BinKind kind, const BinFields& fields) {
@@ -2626,17 +2626,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   ParseContext::Scope lexicalScope(cx_, pc_, usedNames_);
   BINJS_TRY(lexicalScope.init(pc_));
   ListNode* params;
   ListNode* body;
   MOZ_TRY(parseGetterContents(length, &params, &body));
   MOZ_TRY(prependDirectivesToBody(body, directives));
   BINJS_MOZ_TRY_DECL(method,
                      buildFunction(start, kind, name, params, body, funbox));
-  BINJS_TRY_DECL(result, factory_.newObjectMethodOrPropertyDefinition(
+  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 BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::EagerMethod);
@@ -2689,17 +2689,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   ParseContext::Scope lexicalScope(cx_, pc_, usedNames_);
   BINJS_TRY(lexicalScope.init(pc_));
   ListNode* params;
   ListNode* body;
   MOZ_TRY(parseFunctionOrMethodContents(length, &params, &body));
   MOZ_TRY(prependDirectivesToBody(body, directives));
   BINJS_MOZ_TRY_DECL(method,
                      buildFunction(start, kind, name, params, body, funbox));
-  BINJS_TRY_DECL(result, factory_.newObjectMethodOrPropertyDefinition(
+  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 BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::EagerSetter);
@@ -2745,29 +2745,29 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   ParseContext::Scope lexicalScope(cx_, pc_, usedNames_);
   BINJS_TRY(lexicalScope.init(pc_));
   ListNode* params;
   ListNode* body;
   MOZ_TRY(parseSetterContents(length, &params, &body));
   MOZ_TRY(prependDirectivesToBody(body, directives));
   BINJS_MOZ_TRY_DECL(method,
                      buildFunction(start, kind, name, params, body, funbox));
-  BINJS_TRY_DECL(result, factory_.newObjectMethodOrPropertyDefinition(
+  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 BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::EmptyStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
   MOZ_TRY(tokenizer_->checkFields0(kind, fields));
 
-  BINJS_TRY_DECL(result, factory_.newEmptyStatement(tokenizer_->pos(start)));
+  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 BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::ExpressionStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -2775,17 +2775,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 #if defined(DEBUG)
   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,
-                 factory_.newExprStatement(expression, tokenizer_->offset()));
+                 handler_.newExprStatement(expression, tokenizer_->offset()));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceForInOfBinding(
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::ForInOfBinding);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -2810,18 +2810,18 @@ JS::Result<ParseNode*> BinASTParser<Tok>
       pnk = ParseNodeKind::VarStmt;
       break;
     case VariableDeclarationKind::Let:
       return raiseError("Let is not supported in this preview release");
     case VariableDeclarationKind::Const:
       return raiseError("Const is not supported in this preview release");
   }
   BINJS_TRY_DECL(result,
-                 factory_.newDeclarationList(pnk, tokenizer_->pos(start)));
-  factory_.addList(result, binding);
+                 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 BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::ForInStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -2841,25 +2841,25 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
   BINJS_MOZ_TRY_DECL(left, parseForInOfBindingOrAssignmentTarget());
 
   BINJS_MOZ_TRY_DECL(right, parseExpression());
 
   BINJS_MOZ_TRY_DECL(body, parseStatement());
 
   BINJS_TRY_DECL(forHead,
-                 factory_.newForInOrOfHead(ParseNodeKind::ForIn, left, right,
+                 handler_.newForInOrOfHead(ParseNodeKind::ForIn, left, right,
                                            tokenizer_->pos(start)));
   ParseNode* result;
-  BINJS_TRY_VAR(result, factory_.newForStatement(start, forHead, body,
+  BINJS_TRY_VAR(result, handler_.newForStatement(start, forHead, body,
                                                  /* iflags = */ 0));
 
   if (!scope.isEmpty()) {
     BINJS_TRY_DECL(bindings, NewLexicalScopeData(cx_, scope, alloc_, pc_));
-    BINJS_TRY_VAR(result, factory_.newLexicalScope(*bindings, result));
+    BINJS_TRY_VAR(result, handler_.newLexicalScope(*bindings, result));
   }
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceForOfStatement(
     const size_t start, const BinKind kind, const BinFields& fields) {
   return raiseError(
@@ -2889,24 +2889,24 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
   BINJS_MOZ_TRY_DECL(test, parseOptionalExpression());
 
   BINJS_MOZ_TRY_DECL(update, parseOptionalExpression());
 
   BINJS_MOZ_TRY_DECL(body, parseStatement());
 
   BINJS_TRY_DECL(
-      forHead, factory_.newForHead(init, test, update, tokenizer_->pos(start)));
+      forHead, handler_.newForHead(init, test, update, tokenizer_->pos(start)));
   ParseNode* result;
-  BINJS_TRY_VAR(result, factory_.newForStatement(start, forHead, body,
+  BINJS_TRY_VAR(result, handler_.newForStatement(start, forHead, body,
                                                  /* iflags = */ 0));
 
   if (!scope.isEmpty()) {
     BINJS_TRY_DECL(bindings, NewLexicalScopeData(cx_, scope, alloc_, pc_));
-    BINJS_TRY_VAR(result, factory_.newLexicalScope(*bindings, result));
+    BINJS_TRY_VAR(result, handler_.newLexicalScope(*bindings, result));
   }
   return result;
 }
 
 /*
  interface FormalParameters : Node {
     FrozenArray<Parameter> items;
     Binding? rest;
@@ -3183,17 +3183,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   RootedAtom name(cx_);
   MOZ_TRY_VAR(name, tokenizer_->readIdentifierName());
 
   if (!IsIdentifier(name)) {
     return raiseError("Invalid identifier");
   }
   BINJS_TRY(usedNames_.noteUse(cx_, name, pc_->scriptId(),
                                pc_->innermostScope()->id()));
-  BINJS_TRY_DECL(result, factory_.newName(name->asPropertyName(),
+  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 BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::IfStatement);
@@ -3207,17 +3207,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
   BINJS_MOZ_TRY_DECL(test, parseExpression());
 
   BINJS_MOZ_TRY_DECL(consequent, parseStatement());
 
   BINJS_MOZ_TRY_DECL(alternate, parseOptionalStatement());
 
   BINJS_TRY_DECL(result,
-                 factory_.newIfStatement(start, test, consequent, alternate));
+                 handler_.newIfStatement(start, test, consequent, alternate));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceLabelledStatement(
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::LabelledStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -3230,17 +3230,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   RootedAtom label(cx_);
   MOZ_TRY_VAR(label, tokenizer_->readAtom());
   if (!IsIdentifier(label)) {
     return raiseError("Invalid identifier");
   }
   ParseContext::LabelStatement stmt(pc_, label);
   BINJS_MOZ_TRY_DECL(body, parseStatement());
 
-  BINJS_TRY_DECL(result, factory_.newLabeledStatement(label->asPropertyName(),
+  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 BinKind kind, const BinFields& fields) {
@@ -3419,17 +3419,17 @@ BinASTParser<Tok>::parseInterfaceLiteral
 #if defined(DEBUG)
   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,
-                 factory_.newBooleanLiteral(value, tokenizer_->pos(start)));
+                 handler_.newBooleanLiteral(value, tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*>
 BinASTParser<Tok>::parseInterfaceLiteralInfinityExpression(
     const size_t start, const BinKind kind, const BinFields& fields) {
   return raiseError(
@@ -3439,17 +3439,17 @@ BinASTParser<Tok>::parseInterfaceLiteral
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceLiteralNullExpression(
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::LiteralNullExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
   MOZ_TRY(tokenizer_->checkFields0(kind, fields));
 
-  BINJS_TRY_DECL(result, factory_.newNullLiteral(tokenizer_->pos(start)));
+  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 BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::LiteralNumericExpression);
@@ -3457,17 +3457,17 @@ BinASTParser<Tok>::parseInterfaceLiteral
 
 #if defined(DEBUG)
   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, factory_.newNumber(value, DecimalPoint::HasDecimal,
+  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 BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::LiteralPropertyName);
@@ -3480,20 +3480,20 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
   RootedAtom value(cx_);
   MOZ_TRY_VAR(value, tokenizer_->readAtom());
 
   ParseNode* result;
   uint32_t index;
   if (value->isIndex(&index)) {
     BINJS_TRY_VAR(result,
-                  factory_.newNumber(index, NoDecimal,
+                  handler_.newNumber(index, NoDecimal,
                                      TokenPos(start, tokenizer_->offset())));
   } else {
-    BINJS_TRY_VAR(result, factory_.newObjectLiteralPropertyName(
+    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 BinKind kind, const BinFields& fields) {
@@ -3527,17 +3527,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
     }
   }
 
   Rooted<RegExpObject*> reobj(cx_);
   BINJS_TRY_VAR(reobj,
                 RegExpObject::create(cx_, pattern, reflags, TenuredObject));
 
   BINJS_TRY_DECL(result,
-                 factory_.newRegExp(reobj, tokenizer_->pos(start), *this));
+                 handler_.newRegExp(reobj, tokenizer_->pos(start), *this));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceLiteralStringExpression(
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::LiteralStringExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -3546,17 +3546,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   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,
-                 factory_.newStringLiteral(value, tokenizer_->pos(start)));
+                 handler_.newStringLiteral(value, tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceModule(
     const size_t start, const BinKind kind, const BinFields& fields) {
   return raiseError(
       "FIXME: Not implemented yet in this preview release (Module)");
@@ -3572,17 +3572,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   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, factory_.newNewExpression(tokenizer_->pos(start).begin,
+  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 BinKind kind, const BinFields& fields) {
   return raiseError(
@@ -3637,17 +3637,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
     return raiseInvalidKind("Toplevel Statement", kind);
   }
 
   pc_->functionBox()->usesReturn = true;
 
   BINJS_MOZ_TRY_DECL(expression, parseOptionalExpression());
 
   BINJS_TRY_DECL(
-      result, factory_.newReturnStatement(expression, tokenizer_->pos(start)));
+      result, handler_.newReturnStatement(expression, tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceScript(
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::Script);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -3718,17 +3718,17 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
   // TODO: Use this in BinASTParser::buildFunction.
   (void)isThisCaptured;
   Rooted<GCVector<JSAtom*>> positionalParams(cx_, GCVector<JSAtom*>(cx_));
   MOZ_TRY(parseAssertedParameterScope(&positionalParams));
 
   BINJS_MOZ_TRY_DECL(param, parseParameter());
   BINJS_TRY_DECL(params, this->template new_<ListNode>(
                              ParseNodeKind::ParamsBody, param->pn_pos));
-  factory_.addList(params, param);
+  handler_.addList(params, param);
   MOZ_TRY(checkPositionalParameterIndices(positionalParams, params));
   MOZ_TRY(parseAssertedVarScope());
 
   BINJS_MOZ_TRY_DECL(body, parseFunctionBody());
 
   *paramsOut = params;
   *bodyOut = body;
   auto result = Ok();
@@ -3744,23 +3744,23 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 #if defined(DEBUG)
   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(!factory_.isUsableAsObjectPropertyName(name));
-  BINJS_TRY_DECL(propName, factory_.newObjectLiteralPropertyName(
+  MOZ_ASSERT(!handler_.isUsableAsObjectPropertyName(name));
+  BINJS_TRY_DECL(propName, handler_.newObjectLiteralPropertyName(
                                name->template as<NameNode>().name(),
                                tokenizer_->pos(start)));
 
   BINJS_TRY_DECL(result,
-                 factory_.newShorthandPropertyDefinition(propName, name));
+                 handler_.newShorthandPropertyDefinition(propName, name));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceSpreadElement(
     const size_t start, const BinKind kind, const BinFields& fields) {
   return raiseError(
       "FIXME: Not implemented yet in this preview release (SpreadElement)");
@@ -3781,19 +3781,19 @@ BinASTParser<Tok>::parseInterfaceStaticM
 
   BINJS_MOZ_TRY_DECL(object, parseExpressionOrSuper());
   RootedAtom property(cx_);
   {
     nameStart = tokenizer_->offset();
     MOZ_TRY_VAR(property, tokenizer_->readPropertyKey());
   }
 
-  BINJS_TRY_DECL(name, factory_.newPropertyName(property->asPropertyName(),
+  BINJS_TRY_DECL(name, handler_.newPropertyName(property->asPropertyName(),
                                                 tokenizer_->pos(nameStart)));
-  BINJS_TRY_DECL(result, factory_.newPropertyAccess(object, name));
+  BINJS_TRY_DECL(result, handler_.newPropertyAccess(object, name));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceStaticMemberExpression(
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::StaticMemberExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -3806,19 +3806,19 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
   BINJS_MOZ_TRY_DECL(object, parseExpressionOrSuper());
   RootedAtom property(cx_);
   {
     nameStart = tokenizer_->offset();
     MOZ_TRY_VAR(property, tokenizer_->readPropertyKey());
   }
 
-  BINJS_TRY_DECL(name, factory_.newPropertyName(property->asPropertyName(),
+  BINJS_TRY_DECL(name, handler_.newPropertyName(property->asPropertyName(),
                                                 tokenizer_->pos(nameStart)));
-  BINJS_TRY_DECL(result, factory_.newPropertyAccess(object, name));
+  BINJS_TRY_DECL(result, handler_.newPropertyAccess(object, name));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceSuper(
     const size_t start, const BinKind kind, const BinFields& fields) {
   return raiseError(
       "FIXME: Not implemented yet in this preview release (Super)");
@@ -3857,17 +3857,17 @@ JS::Result<CaseClause*> BinASTParser<Tok
   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, factory_.newCaseOrDefault(start, test, consequent));
+  BINJS_TRY_DECL(result, handler_.newCaseOrDefault(start, test, consequent));
   return result;
 }
 
 /*
  interface SwitchDefault : Node {
     FrozenArray<Statement> consequent;
  }
 */
@@ -3896,17 +3896,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
 #if defined(DEBUG)
   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, factory_.newCaseOrDefault(start, nullptr, consequent));
+  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 BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::SwitchStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -3915,18 +3915,18 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   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, factory_.newLexicalScope(nullptr, cases));
-  BINJS_TRY_DECL(result, factory_.newSwitchStatement(start, discriminant, scope,
+  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 BinKind kind, const BinFields& fields) {
@@ -3945,25 +3945,25 @@ BinASTParser<Tok>::parseInterfaceSwitchS
   BINJS_MOZ_TRY_DECL(preDefaultCases, parseListOfSwitchCase());
 
   BINJS_MOZ_TRY_DECL(defaultCase, parseSwitchDefault());
 
   BINJS_MOZ_TRY_DECL(postDefaultCases, parseListOfSwitchCase());
 
   // Concatenate `preDefaultCase`, `defaultCase`, `postDefaultCase`
   auto cases = preDefaultCases;
-  factory_.addList(cases, defaultCase);
+  handler_.addList(cases, defaultCase);
   ParseNode* iter = postDefaultCases->head();
   while (iter) {
     ParseNode* next = iter->pn_next;
-    factory_.addList(cases, iter);
+    handler_.addList(cases, iter);
     iter = next;
   }
-  BINJS_TRY_DECL(scope, factory_.newLexicalScope(nullptr, cases));
-  BINJS_TRY_DECL(result, factory_.newSwitchStatement(start, discriminant, scope,
+  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 BinKind kind, const BinFields& fields) {
   return raiseError(
@@ -3983,20 +3983,20 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   }
 
   TokenPos pos = tokenizer_->pos(start);
   ParseNode* thisName(nullptr);
   if (pc_->sc()->thisBinding() == ThisBinding::Function) {
     HandlePropertyName dotThis = cx_->names().dotThis;
     BINJS_TRY(usedNames_.noteUse(cx_, dotThis, pc_->scriptId(),
                                  pc_->innermostScope()->id()));
-    BINJS_TRY_VAR(thisName, factory_.newName(dotThis, pos, cx_));
+    BINJS_TRY_VAR(thisName, handler_.newName(dotThis, pos, cx_));
   }
 
-  BINJS_TRY_DECL(result, factory_.newThisLiteral(pos, thisName));
+  BINJS_TRY_DECL(result, handler_.newThisLiteral(pos, thisName));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceThrowStatement(
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::ThrowStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -4004,17 +4004,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 #if defined(DEBUG)
   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, factory_.newThrowStatement(expression, tokenizer_->pos(start)));
+      result, handler_.newThrowStatement(expression, tokenizer_->pos(start)));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceTryCatchStatement(
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::TryCatchStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -4029,17 +4029,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
     ParseContext::Scope scope(cx_, pc_, usedNames_);
     BINJS_TRY(scope.init(pc_));
     MOZ_TRY_VAR(body, parseBlock());
   }
 
   BINJS_MOZ_TRY_DECL(catchClause, parseCatchClause());
 
   BINJS_TRY_DECL(result,
-                 factory_.newTryStatement(start, body, catchClause,
+                 handler_.newTryStatement(start, body, catchClause,
                                           /* finallyBlock = */ nullptr));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceTryFinallyStatement(
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::TryFinallyStatement);
@@ -4063,17 +4063,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   {
     ParseContext::Statement stmt(pc_, StatementKind::Finally);
     ParseContext::Scope scope(cx_, pc_, usedNames_);
     BINJS_TRY(scope.init(pc_));
     MOZ_TRY_VAR(finalizer, parseBlock());
   }
 
   BINJS_TRY_DECL(result,
-                 factory_.newTryStatement(start, body, catchClause, finalizer));
+                 handler_.newTryStatement(start, body, catchClause, finalizer));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceUnaryExpression(
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::UnaryExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -4127,17 +4127,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
           pnk = ParseNodeKind::DeleteElemExpr;
           break;
         default:
           pnk = ParseNodeKind::DeleteExpr;
       }
       break;
     }
   }
-  BINJS_TRY_DECL(result, factory_.newUnary(pnk, start, operand));
+  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 BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::UpdateExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -4160,17 +4160,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
       pnk = isPrefix ? ParseNodeKind::PreIncrementExpr
                      : ParseNodeKind::PostIncrementExpr;
       break;
     case UpdateOperator::Decr:
       pnk = isPrefix ? ParseNodeKind::PreDecrementExpr
                      : ParseNodeKind::PostDecrementExpr;
       break;
   }
-  BINJS_TRY_DECL(result, factory_.newUnary(pnk, start, operand));
+  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 BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::VariableDeclaration);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -4247,30 +4247,30 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
   ParseNode* result;
   if (binding->isKind(ParseNodeKind::Name)) {
     // `var foo [= bar]``
     NameNode* bindingNameNode = &binding->template as<NameNode>();
     MOZ_TRY(checkBinding(bindingNameNode->atom()->asPropertyName()));
     result = bindingNameNode;
     if (init) {
-      BINJS_TRY(factory_.finishInitializerAssignment(bindingNameNode, init));
+      BINJS_TRY(handler_.finishInitializerAssignment(bindingNameNode, init));
     }
   } else {
     // `var pattern = bar`
     if (!init) {
       // Here, `init` is required.
       return raiseMissingField("VariableDeclarator (with non-trivial pattern)",
                                BinField::Init);
     }
 
     MOZ_CRASH(
         "Unimplemented: AssertedScope check for BindingPattern variable "
         "declaration");
-    BINJS_TRY_VAR(result, factory_.newAssignment(ParseNodeKind::AssignExpr,
+    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 BinKind kind, const BinFields& fields) {
@@ -4282,17 +4282,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   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, factory_.newWhileStatement(start, test, body));
+  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 BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::WithStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
@@ -4303,17 +4303,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 #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, factory_.newWithStatement(start, object, body));
+  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 BinKind kind, const BinFields& fields) {
   return raiseError(
       "FIXME: Not implemented yet in this preview release (YieldExpression)");
@@ -4578,40 +4578,40 @@ BinASTParser<Tok>::parseVariableDeclarat
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseArguments() {
   uint32_t length;
   AutoList guard(*tokenizer_);
 
   const auto start = tokenizer_->offset();
   MOZ_TRY(tokenizer_->enterList(length, guard));
-  BINJS_TRY_DECL(result, factory_.newList(ParseNodeKind::Arguments,
+  BINJS_TRY_DECL(result, handler_.newList(ParseNodeKind::Arguments,
                                           tokenizer_->pos(start)));
 
   for (uint32_t i = 0; i < length; ++i) {
     BINJS_MOZ_TRY_DECL(item, parseSpreadElementOrExpression());
-    factory_.addList(/* list = */ result, /* kid = */ item);
+    handler_.addList(/* list = */ result, /* kid = */ item);
   }
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ListNode*> BinASTParser<Tok>::parseFunctionBody() {
   uint32_t length;
   AutoList guard(*tokenizer_);
 
   const auto start = tokenizer_->offset();
   MOZ_TRY(tokenizer_->enterList(length, guard));
-  BINJS_TRY_DECL(result, factory_.newStatementList(tokenizer_->pos(start)));
+  BINJS_TRY_DECL(result, handler_.newStatementList(tokenizer_->pos(start)));
 
   for (uint32_t i = 0; i < length; ++i) {
     BINJS_MOZ_TRY_DECL(item, parseStatement());
-    factory_.addStatementToList(result, item);
+    handler_.addStatementToList(result, item);
   }
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseListOfAssertedBoundName(
@@ -4686,35 +4686,35 @@ BinASTParser<Tok>::parseListOfAssertedMa
 
 template <typename Tok>
 JS::Result<ListNode*> BinASTParser<Tok>::parseListOfDirective() {
   uint32_t length;
   AutoList guard(*tokenizer_);
 
   const auto start = tokenizer_->offset();
   MOZ_TRY(tokenizer_->enterList(length, guard));
-  BINJS_TRY_DECL(result, factory_.newStatementList(tokenizer_->pos(start)));
+  BINJS_TRY_DECL(result, handler_.newStatementList(tokenizer_->pos(start)));
 
   for (uint32_t i = 0; i < length; ++i) {
     BINJS_MOZ_TRY_DECL(item, parseDirective());
-    factory_.addStatementToList(result, item);
+    handler_.addStatementToList(result, item);
   }
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ListNode*> BinASTParser<Tok>::parseListOfObjectProperty() {
   uint32_t length;
   AutoList guard(*tokenizer_);
 
   const auto start = tokenizer_->offset();
   MOZ_TRY(tokenizer_->enterList(length, guard));
-  BINJS_TRY_DECL(result, factory_.newObjectLiteral(start));
+  BINJS_TRY_DECL(result, handler_.newObjectLiteral(start));
 
   for (uint32_t i = 0; i < length; ++i) {
     BINJS_MOZ_TRY_DECL(item, parseObjectProperty());
     if (!item->isConstant()) result->setHasNonConstInitializer();
     result->appendWithoutOrderAssumption(item);
   }
 
   MOZ_TRY(guard.done());
@@ -4724,24 +4724,24 @@ JS::Result<ListNode*> BinASTParser<Tok>:
 template <typename Tok>
 JS::Result<ListNode*>
 BinASTParser<Tok>::parseListOfOptionalSpreadElementOrExpression() {
   uint32_t length;
   AutoList guard(*tokenizer_);
 
   const auto start = tokenizer_->offset();
   MOZ_TRY(tokenizer_->enterList(length, guard));
-  BINJS_TRY_DECL(result, factory_.newArrayLiteral(start));
+  BINJS_TRY_DECL(result, handler_.newArrayLiteral(start));
 
   for (uint32_t i = 0; i < length; ++i) {
     BINJS_MOZ_TRY_DECL(item, parseOptionalSpreadElementOrExpression());
     if (item) {
-      factory_.addArrayElement(result, item);  // Infallible.
+      handler_.addArrayElement(result, item);  // Infallible.
     } else {
-      BINJS_TRY(factory_.addElision(result, tokenizer_->pos(start)));
+      BINJS_TRY(handler_.addElision(result, tokenizer_->pos(start)));
     }
   }
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
@@ -4752,68 +4752,68 @@ JS::Result<ListNode*> BinASTParser<Tok>:
   const auto start = tokenizer_->offset();
   MOZ_TRY(tokenizer_->enterList(length, guard));
   BINJS_TRY_DECL(result,
                  this->template new_<ListNode>(ParseNodeKind::ParamsBody,
                                                tokenizer_->pos(start)));
 
   for (uint32_t i = 0; i < length; ++i) {
     BINJS_MOZ_TRY_DECL(item, parseParameter());
-    factory_.addList(/* list = */ result, /* kid = */ item);
+    handler_.addList(/* list = */ result, /* kid = */ item);
   }
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ListNode*> BinASTParser<Tok>::parseListOfStatement() {
   uint32_t length;
   AutoList guard(*tokenizer_);
 
   const auto start = tokenizer_->offset();
   MOZ_TRY(tokenizer_->enterList(length, guard));
-  BINJS_TRY_DECL(result, factory_.newStatementList(tokenizer_->pos(start)));
+  BINJS_TRY_DECL(result, handler_.newStatementList(tokenizer_->pos(start)));
 
   for (uint32_t i = 0; i < length; ++i) {
     BINJS_MOZ_TRY_DECL(item, parseStatement());
-    factory_.addStatementToList(result, item);
+    handler_.addStatementToList(result, item);
   }
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ListNode*> BinASTParser<Tok>::parseListOfSwitchCase() {
   uint32_t length;
   AutoList guard(*tokenizer_);
 
   const auto start = tokenizer_->offset();
   MOZ_TRY(tokenizer_->enterList(length, guard));
-  BINJS_TRY_DECL(result, factory_.newStatementList(tokenizer_->pos(start)));
+  BINJS_TRY_DECL(result, handler_.newStatementList(tokenizer_->pos(start)));
 
   for (uint32_t i = 0; i < length; ++i) {
     BINJS_MOZ_TRY_DECL(item, parseSwitchCase());
-    factory_.addCaseStatementToList(result, item);
+    handler_.addCaseStatementToList(result, item);
   }
 
   MOZ_TRY(guard.done());
   return result;
 }
 
 template <typename Tok>
 JS::Result<ListNode*> BinASTParser<Tok>::parseListOfVariableDeclarator(
     ParseNodeKind declarationListKind) {
   uint32_t length;
   AutoList guard(*tokenizer_);
 
   const auto start = tokenizer_->offset();
   MOZ_TRY(tokenizer_->enterList(length, guard));
-  BINJS_TRY_DECL(result, factory_.newDeclarationList(declarationListKind,
+  BINJS_TRY_DECL(result, handler_.newDeclarationList(declarationListKind,
                                                      tokenizer_->pos(start)));
 
   for (uint32_t i = 0; i < length; ++i) {
     BINJS_MOZ_TRY_DECL(item, parseVariableDeclarator());
     result->appendWithoutOrderAssumption(item);
   }
 
   MOZ_TRY(guard.done());
--- a/js/src/frontend/BinASTParser.h
+++ b/js/src/frontend/BinASTParser.h
@@ -68,17 +68,17 @@ class BinASTParser : public BinASTParser
 
  protected:
   // BinASTParserBase fields.
   using Base::cx_;
 
   using Base::alloc_;
   using Base::usedNames_;
 
-  using Base::factory_;
+  using Base::handler_;
   using Base::pc_;
   using Base::sourceObject_;
 
  protected:
   // BinASTParserPerTokenizer types.
   using AutoVariableDeclarationKind =
       typename Base::AutoVariableDeclarationKind;
 
--- a/js/src/frontend/BinASTParserBase.cpp
+++ b/js/src/frontend/BinASTParserBase.cpp
@@ -22,17 +22,17 @@ BinASTParserBase::BinASTParserBase(JSCon
       alloc_(alloc),
       traceListHead_(nullptr),
       usedNames_(usedNames),
       nodeAlloc_(cx, alloc),
       keepAtoms_(cx),
       sourceObject_(cx, sourceObject),
       lazyScript_(cx, lazyScript),
       pc_(nullptr),
-      factory_(cx, alloc, nullptr, SourceKind::Binary) {
+      handler_(cx, alloc, nullptr, SourceKind::Binary) {
   MOZ_ASSERT_IF(lazyScript, lazyScript->isBinAST());
   cx->frontendCollectionPool().addActiveCompilation();
   tempPoolMark_ = alloc.mark();
 }
 
 BinASTParserBase::~BinASTParserBase() {
   alloc_.release(tempPoolMark_);
 
--- a/js/src/frontend/BinASTParserBase.h
+++ b/js/src/frontend/BinASTParserBase.h
@@ -70,17 +70,17 @@ class BinASTParserBase : private JS::Aut
   // ---- Parsing-related stuff
  protected:
   // Root atoms and objects allocated for the parse tree.
   AutoKeepAtoms keepAtoms_;
 
   RootedScriptSourceObject sourceObject_;
   Rooted<LazyScript*> lazyScript_;
   ParseContext* pc_;
-  FullParseHandler factory_;
+  FullParseHandler handler_;
 
   friend class BinParseContext;
 };
 
 }  // namespace frontend
 }  // namespace js
 
 #endif  // frontend_BinASTParserBase_h
--- a/js/src/frontend/BinASTParserPerTokenizer.cpp
+++ b/js/src/frontend/BinASTParserPerTokenizer.cpp
@@ -175,17 +175,17 @@ JS::Result<FunctionNode*> BinASTParserPe
   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, factory_.newLexicalScope(*lexicalScopeData, tmpBody));
+  BINJS_TRY_DECL(body, handler_.newLexicalScope(*lexicalScopeData, tmpBody));
 
   auto binKind = isExpr ? BinKind::LazyFunctionExpression
                         : BinKind::LazyFunctionDeclaration;
   return buildFunction(firstOffset, binKind, nullptr, params, body, funbox);
 }
 
 template <typename Tok>
 void BinASTParserPerTokenizer<Tok>::forceStrictIfNecessary(
@@ -290,19 +290,19 @@ FunctionSyntaxKind BinKindToFunctionSynt
 
 template <typename Tok>
 JS::Result<FunctionNode*> BinASTParserPerTokenizer<Tok>::makeEmptyFunctionNode(
     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 = BinKindToFunctionSyntaxKind(kind);
 
-  BINJS_TRY_DECL(result, factory_.newFunction(syntaxKind, pos));
+  BINJS_TRY_DECL(result, handler_.newFunction(syntaxKind, pos));
 
-  factory_.setFunctionBox(result, funbox);
+  handler_.setFunctionBox(result, funbox);
 
   return result;
 }
 
 template <typename Tok>
 JS::Result<FunctionNode*> BinASTParserPerTokenizer<Tok>::buildFunction(
     const size_t start, const BinKind kind, ParseNode* name, ListNode* params,
     ParseNode* body, FunctionBox* funbox) {
@@ -313,17 +313,17 @@ JS::Result<FunctionNode*> BinASTParserPe
     funbox->function()->setArgCount(params ? uint16_t(params->count()) : 0);
   }
 
   // ParseNode represents the body as concatenated after the params.
   params->appendWithoutOrderAssumption(body);
 
   BINJS_MOZ_TRY_DECL(result, makeEmptyFunctionNode(start, kind, funbox));
 
-  factory_.setFunctionFormalParametersAndBody(result, params);
+  handler_.setFunctionFormalParametersAndBody(result, params);
 
   HandlePropertyName dotThis = cx_->names().dotThis;
   const bool declareThis = hasUsedName(dotThis) ||
                            funbox->bindingsAccessedDynamically() ||
                            funbox->isDerivedClassConstructor();
 
   if (declareThis) {
     ParseContext::Scope& funScope = pc_->functionScope();
@@ -376,22 +376,22 @@ JS::Result<FunctionNode*> BinASTParserPe
       BINJS_TRY(funScope.addDeclaredName(
           pc_, p, dotGenerator, DeclarationKind::Var, DeclaredNameInfo::npos));
     }
 
     BINJS_TRY(usedNames_.noteUse(cx_, dotGenerator, pc_->scriptId(),
                                  pc_->innermostScope()->id()));
 
     BINJS_TRY_DECL(
-        dotGen, factory_.newName(dotGenerator,
+        dotGen, handler_.newName(dotGenerator,
                                  tokenizer_->pos(tokenizer_->offset()), cx_));
 
     ListNode* stmtList =
         &body->as<LexicalScopeNode>().scopeBody()->as<ListNode>();
-    BINJS_TRY(factory_.prependInitialYield(stmtList, dotGen));
+    BINJS_TRY(handler_.prependInitialYield(stmtList, dotGen));
   }
 
   // Check all our bindings after maybe adding function metavars.
   MOZ_TRY(checkFunctionClosedVars());
 
   BINJS_TRY_DECL(bindings, NewFunctionScopeData(cx_, pc_->functionScope(),
                                                 /* hasParameterExprs = */ false,
                                                 alloc_, pc_));
@@ -675,17 +675,17 @@ JS::Result<Ok> BinASTParserPerTokenizer<
 
   // Prepend in the reverse order by using stack, so that the directives are
   // prepended in the original order.
   if (ParseNode* next = directive->pn_next) {
     MOZ_TRY(prependDirectivesImpl(body, next));
   }
 
   BINJS_TRY_DECL(statement,
-                 factory_.newExprStatement(directive, directive->pn_pos.end));
+                 handler_.newExprStatement(directive, directive->pn_pos.end));
   body->prependAndUpdatePos(statement);
 
   return Ok();
 }
 
 template <typename Tok>
 mozilla::GenericErrorResult<JS::Error&>
 BinASTParserPerTokenizer<Tok>::raiseInvalidClosedVar(JSAtom* name) {
--- a/js/src/frontend/BinASTParserPerTokenizer.h
+++ b/js/src/frontend/BinASTParserPerTokenizer.h
@@ -235,17 +235,17 @@ class BinASTParserPerTokenizer : public 
     traceListHead_ = objbox;
 
     return objbox;
   }
 
   virtual ErrorReporter& errorReporter() override { return *this; }
   virtual const ErrorReporter& errorReporter() const override { return *this; }
 
-  virtual FullParseHandler& astGenerator() override { return factory_; }
+  virtual FullParseHandler& astGenerator() override { return handler_; }
 
  public:
   // Implement ErrorReporter.
 
   virtual void lineAndColumnAt(size_t offset, uint32_t* line,
                                uint32_t* column) const override {
     *line = lineAt(offset);
     *column = columnAt(offset);
--- a/js/src/frontend/BinSource.yaml
+++ b/js/src/frontend/BinSource.yaml
@@ -143,17 +143,17 @@ hpp:
         // BinASTParserBase fields.
         using Base::cx_;
 
         using Base::alloc_;
         using Base::usedNames_;
 
         using Base::sourceObject_;
         using Base::pc_;
-        using Base::factory_;
+        using Base::handler_;
 
        protected:
         // BinASTParserPerTokenizer types.
         using AutoVariableDeclarationKind =
             typename Base::AutoVariableDeclarationKind;
 
        protected:
         // BinASTParserPerTokenizer fields.
@@ -342,20 +342,20 @@ hpp:
 
       } // namespace frontend
       } // namespace js
 
       #endif // frontend_BinToken_h
 
 Arguments:
   init: |
-    BINJS_TRY_DECL(result, factory_.newList(ParseNodeKind::Arguments,
+    BINJS_TRY_DECL(result, handler_.newList(ParseNodeKind::Arguments,
                                             tokenizer_->pos(start)));
   append:
-    factory_.addList(/* list = */ result, /* kid = */ item);
+    handler_.addList(/* list = */ result, /* kid = */ item);
 
 ArrayExpression:
   build: |
     if (elements->empty()) {
       elements->setHasNonConstInitializer();
     }
     auto result = elements;
 
@@ -489,37 +489,37 @@ AssertedScriptGlobalScope:
 AssertedVarScope:
   inherits: AssertedBlockScope
   init: |
     const auto scopeKind = AssertedScopeKind::Var;
 
 AssignmentExpression:
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newAssignment(ParseNodeKind::AssignExpr,
+                   handler_.newAssignment(ParseNodeKind::AssignExpr,
                                           binding, expression));
 
 AssignmentTargetIdentifier:
   build: |
     if (!IsIdentifier(name)) {
       return raiseError("Invalid identifier");
     }
     BINJS_TRY(usedNames_.noteUse(cx_, name, pc_->scriptId(),
                                  pc_->innermostScope()->id()));
     BINJS_TRY_DECL(result,
-                   factory_.newName(name->asPropertyName(),
+                   handler_.newName(name->asPropertyName(),
                                     tokenizer_->pos(start), cx_));
 
 BindingIdentifier:
   build: |
     if (!IsIdentifier(name)) {
       return raiseError("Invalid identifier");
     }
     BINJS_TRY_DECL(result,
-                   factory_.newName(name->asPropertyName(),
+                   handler_.newName(name->asPropertyName(),
                                     tokenizer_->pos(start), cx_));
 
 BinaryExpression:
   build: |
     ParseNodeKind pnk;
     switch (operator_) {
       case BinaryOperator::Comma:
         pnk = ParseNodeKind::CommaExpr;
@@ -600,33 +600,33 @@ BinaryExpression:
 
     ParseNode* result;
     // ParseNodeKind::PowExpr is not left-associative
     if (left->isKind(pnk) && pnk != ParseNodeKind::PowExpr) {
       // Regroup left-associative operations into lists.
       left->template as<ListNode>().appendWithoutOrderAssumption(right);
       result = left;
     } else {
-      BINJS_TRY_DECL(list, factory_.newList(pnk, tokenizer_->pos(start)));
+      BINJS_TRY_DECL(list, handler_.newList(pnk, tokenizer_->pos(start)));
 
       list->appendWithoutOrderAssumption(left);
       list->appendWithoutOrderAssumption(right);
       result = list;
     }
 
 Block:
   init: |
     ParseContext::Statement stmt(pc_, StatementKind::Block);
     ParseContext::Scope currentScope(cx_, pc_, usedNames_);
     BINJS_TRY(currentScope.init(pc_));
   build: |
     MOZ_TRY(checkClosedVars(currentScope));
     BINJS_TRY_DECL(bindings,
                    NewLexicalScopeData(cx_, currentScope, alloc_, pc_));
-    BINJS_TRY_DECL(result, factory_.newLexicalScope(*bindings, statements));
+    BINJS_TRY_DECL(result, handler_.newLexicalScope(*bindings, statements));
 
 BreakStatement:
   fields:
     label:
       block:
         replace: |
           RootedAtom label(cx_);
           MOZ_TRY_VAR(label, tokenizer_->readMaybeAtom());
@@ -647,65 +647,65 @@ BreakStatement:
           return cx_->alreadyReportedError();
         case ParseContext::BreakStatementError::LabelNotFound:
           this->error(JSMSG_LABEL_NOT_FOUND);
           return cx_->alreadyReportedError();
       }
     }
 
     BINJS_TRY_DECL(result,
-                   factory_.newBreakStatement(label ? label->asPropertyName()
+                   handler_.newBreakStatement(label ? label->asPropertyName()
                                                     : nullptr,
                                               tokenizer_->pos(start)));
 
 CallExpression:
   build: |
     auto op = JSOP_CALL;
 
     // Try to optimize funcall and funapply at the bytecode level
-    if (PropertyName* prop = factory_.maybeDottedProperty(callee)) {
+    if (PropertyName* prop = handler_.maybeDottedProperty(callee)) {
       if (prop == cx_->names().apply) {
         op = JSOP_FUNAPPLY;
         if (pc_->isFunctionBox()) {
           pc_->functionBox()->usesApply = true;
         }
       } else if (prop == cx_->names().call) {
         op = JSOP_FUNCALL;
       }
     }
 
     // Check for direct calls to `eval`.
-    if (factory_.isEvalName(callee, cx_)) {
+    if (handler_.isEvalName(callee, cx_)) {
       if (!pc_->varScope().lookupDeclaredNameForAdd(cx_->names().eval) &&
           !pc_->innermostScope()->lookupDeclaredNameForAdd(cx_->names().eval)) {
         // This is a direct call to `eval`.
         if (!pc_->sc()->hasDirectEval()) {
           return raiseMissingDirectEvalInAssertedScope();
         }
 
         op = pc_->sc()->strict() ? JSOP_STRICTEVAL : JSOP_EVAL;
       }
     }
 
-    BINJS_TRY_DECL(result, factory_.newCall(callee, arguments));
+    BINJS_TRY_DECL(result, handler_.newCall(callee, arguments));
     result->setOp(op);
 
 CatchClause:
   type-ok:
     LexicalScopeNode*
   init: |
     ParseContext::Statement stmt(pc_, StatementKind::Catch);
     ParseContext::Scope currentScope(cx_, pc_, usedNames_);
     BINJS_TRY(currentScope.init(pc_));
   build: |
     MOZ_TRY(checkClosedVars(currentScope));
     BINJS_TRY_DECL(bindings,
                    NewLexicalScopeData(cx_, currentScope, alloc_, pc_));
-    BINJS_TRY_DECL(result, factory_.newLexicalScope(*bindings, body));
-    BINJS_TRY(factory_.setupCatchScope(result, binding, body));
+    BINJS_TRY_DECL(result, handler_.newLexicalScope(*bindings, body));
+    BINJS_TRY(handler_.setupCatchScope(result, binding, body));
 
 CompoundAssignmentExpression:
   build: |
     ParseNodeKind pnk;
     switch (operator_){
       case CompoundAssignmentOperator::PlusAssign:
         pnk = ParseNodeKind::AddAssignExpr;
         break;
@@ -738,34 +738,34 @@ CompoundAssignmentExpression:
         break;
       case CompoundAssignmentOperator::BitXorAssign:
         pnk = ParseNodeKind::BitXorAssignExpr;
         break;
       case CompoundAssignmentOperator::BitAndAssign:
         pnk = ParseNodeKind::BitAndAssignExpr;
         break;
     }
-    BINJS_TRY_DECL(result, factory_.newAssignment(pnk, binding, expression));
+    BINJS_TRY_DECL(result, handler_.newAssignment(pnk, binding, expression));
 
 ComputedMemberAssignmentTarget:
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newPropertyByValue(object, expression,
+                   handler_.newPropertyByValue(object, expression,
                                                tokenizer_->offset()));
 
 ComputedMemberExpression:
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newPropertyByValue(object, expression,
+                   handler_.newPropertyByValue(object, expression,
                                                tokenizer_->offset()));
 
 ConditionalExpression:
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newConditional(test, consequent, alternate));
+                   handler_.newConditional(test, consequent, alternate));
 
 ContinueStatement:
   fields:
     label:
       block:
         replace: |
           RootedAtom label(cx_);
           MOZ_TRY_VAR(label, tokenizer_->readMaybeAtom());
@@ -786,50 +786,50 @@ ContinueStatement:
           return cx_->alreadyReportedError();
         case ParseContext::ContinueStatementError::LabelNotFound:
           this->error(JSMSG_LABEL_NOT_FOUND);
           return cx_->alreadyReportedError();
       }
     }
 
     BINJS_TRY_DECL(result,
-                   factory_.newContinueStatement(label ? label->asPropertyName()
+                   handler_.newContinueStatement(label ? label->asPropertyName()
                                                        : nullptr,
                                                  tokenizer_->pos(start)));
 
 DataProperty:
   build: |
-    if (!factory_.isUsableAsObjectPropertyName(name)) {
+    if (!handler_.isUsableAsObjectPropertyName(name)) {
       return raiseError("DataProperty key kind");
     }
 
     ParseNode* result;
     if (name->template is<NameNode>() &&
         name->template as<NameNode>().atom() == cx_->names().proto) {
       BINJS_TRY_VAR(result,
-                    factory_.newUnary(ParseNodeKind::MutateProto, start,
+                    handler_.newUnary(ParseNodeKind::MutateProto, start,
                                       expression));
     } else {
       BINJS_TRY_VAR(result,
-                    factory_.newObjectMethodOrPropertyDefinition(name,
+                    handler_.newObjectMethodOrPropertyDefinition(name,
                                                                  expression,
                                                                  AccessorType::None));
     }
 
 Directive:
   build: |
     TokenPos pos = tokenizer_->pos(start);
-    BINJS_TRY_DECL(result, factory_.newStringLiteral(rawValue, pos));
+    BINJS_TRY_DECL(result, handler_.newStringLiteral(rawValue, pos));
 
 DoWhileStatement:
   init:
     ParseContext::Statement stmt(pc_, StatementKind::DoLoop);
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newDoWhileStatement(body, test,
+                   handler_.newDoWhileStatement(body, test,
                                                 tokenizer_->pos(start)));
 
 EagerFunctionDeclaration:
   init: |
     const auto syntax = FunctionSyntaxKind::Statement;
   inherits: EagerFunctionExpression
 
 LazyFunctionDeclaration:
@@ -889,17 +889,17 @@ GetterContents:
 SetterContents:
   inherits: FunctionExpressionContents
   fields:
     param:
       after: |
         BINJS_TRY_DECL(params,
                        this->template new_<ListNode>(ParseNodeKind::ParamsBody,
                                                      param->pn_pos));
-        factory_.addList(params, param);
+        handler_.addList(params, param);
         MOZ_TRY(checkPositionalParameterIndices(positionalParams, params));
 
 EagerFunctionExpression:
   init: |
     const auto syntax = FunctionSyntaxKind::Expression;
   fields:
     isGenerator:
       after: |
@@ -938,17 +938,17 @@ EagerFunctionExpression:
       extra-args: |
         length, &params, &body
       after: |
         MOZ_TRY(prependDirectivesToBody(body, directives));
   build: |
     BINJS_TRY_DECL(lexicalScopeData,
                    NewLexicalScopeData(cx_, lexicalScope, alloc_, pc_));
     BINJS_TRY_DECL(bodyScope,
-                   factory_.newLexicalScope(*lexicalScopeData, body));
+                   handler_.newLexicalScope(*lexicalScopeData, body));
     BINJS_MOZ_TRY_DECL(result,
                        buildFunction(start, kind, name, params, bodyScope,
                                      funbox));
 
 LazyFunctionExpression:
   init: |
     const auto syntax = FunctionSyntaxKind::Expression;
   fields:
@@ -1010,35 +1010,35 @@ EagerMethod:
   init: |
     const auto syntax = FunctionSyntaxKind::Method;
     const auto accessorType = AccessorType::None;
   inherits: EagerFunctionExpression
   build: |
     BINJS_MOZ_TRY_DECL(method,
                        buildFunction(start, kind, name, params, body, funbox));
     BINJS_TRY_DECL(result,
-                   factory_.newObjectMethodOrPropertyDefinition(name, method,
+                   handler_.newObjectMethodOrPropertyDefinition(name, method,
                                                                 accessorType));
 
 EagerSetter:
   init: |
     const auto syntax = FunctionSyntaxKind::Setter;
     const bool isGenerator = false;
     const bool isAsync = false;
     const auto accessorType = AccessorType::Setter;
   inherits: EagerMethod
 
 EmptyStatement:
   build:
-    BINJS_TRY_DECL(result, factory_.newEmptyStatement(tokenizer_->pos(start)));
+    BINJS_TRY_DECL(result, handler_.newEmptyStatement(tokenizer_->pos(start)));
 
 ExpressionStatement:
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newExprStatement(expression, tokenizer_->offset()));
+                   handler_.newExprStatement(expression, tokenizer_->offset()));
 
 ForInOfBinding:
   init:
     AutoVariableDeclarationKind kindGuard(this);
   build: |
     // Restored by `kindGuard`.
     variableDeclarationKind_ = kind_;
     MOZ_TRY(checkBinding(binding->template as<NameNode>().atom()->asPropertyName()));
@@ -1048,42 +1048,42 @@ ForInOfBinding:
         pnk = ParseNodeKind::VarStmt;
         break;
       case VariableDeclarationKind::Let:
         return raiseError("Let is not supported in this preview release");
       case VariableDeclarationKind::Const:
         return raiseError("Const is not supported in this preview release");
     }
     BINJS_TRY_DECL(result,
-                   factory_.newDeclarationList(pnk, tokenizer_->pos(start)));
-    factory_.addList(result, binding);
+                   handler_.newDeclarationList(pnk, tokenizer_->pos(start)));
+    handler_.addList(result, binding);
 
 
 
 ForInStatement:
   init: |
     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_);
     BINJS_TRY(scope.init(pc_));
   build: |
     BINJS_TRY_DECL(forHead,
-                   factory_.newForInOrOfHead(ParseNodeKind::ForIn, left, right,
+                   handler_.newForInOrOfHead(ParseNodeKind::ForIn, left, right,
                                              tokenizer_->pos(start)));
     ParseNode* result;
     BINJS_TRY_VAR(result,
-                  factory_.newForStatement(start, forHead, body,
+                  handler_.newForStatement(start, forHead, body,
                                             /* iflags = */ 0));
 
     if (!scope.isEmpty()) {
       BINJS_TRY_DECL(bindings, NewLexicalScopeData(cx_, scope, alloc_, pc_));
-      BINJS_TRY_VAR(result, factory_.newLexicalScope(*bindings, result));
+      BINJS_TRY_VAR(result, handler_.newLexicalScope(*bindings, result));
     }
 
 FormalParameters:
   type-ok:
     ListNode*
   build: |
     auto result = items;
     if (rest) {
@@ -1096,59 +1096,59 @@ ForStatement:
 
     // 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_);
     BINJS_TRY(scope.init(pc_));
   build: |
     BINJS_TRY_DECL(forHead,
-                   factory_.newForHead(init, test, update,
+                   handler_.newForHead(init, test, update,
                                        tokenizer_->pos(start)));
     ParseNode* result;
     BINJS_TRY_VAR(result,
-                  factory_.newForStatement(start, forHead, body,
+                  handler_.newForStatement(start, forHead, body,
                                            /* iflags = */ 0));
 
     if (!scope.isEmpty()) {
       BINJS_TRY_DECL(bindings,
                      NewLexicalScopeData(cx_, scope, alloc_, pc_));
-      BINJS_TRY_VAR(result, factory_.newLexicalScope(*bindings, result));
+      BINJS_TRY_VAR(result, handler_.newLexicalScope(*bindings, result));
     }
 
 FunctionBody:
   inherits: ListOfStatement
 
 IdentifierExpression:
   build: |
     if (!IsIdentifier(name)) {
       return raiseError("Invalid identifier");
     }
     BINJS_TRY(usedNames_.noteUse(cx_, name, pc_->scriptId(),
                                  pc_->innermostScope()->id()));
     BINJS_TRY_DECL(result,
-                   factory_.newName(name->asPropertyName(),
+                   handler_.newName(name->asPropertyName(),
                                     tokenizer_->pos(start), cx_));
 
 IfStatement:
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newIfStatement(start, test, consequent, alternate));
+                   handler_.newIfStatement(start, test, consequent, alternate));
 
 LabelledStatement:
   fields:
     label:
       after: |
         if (!IsIdentifier(label)) {
           return raiseError("Invalid identifier");
         }
         ParseContext::LabelStatement stmt(pc_, label);
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newLabeledStatement(label->asPropertyName(), body,
+                   handler_.newLabeledStatement(label->asPropertyName(), body,
                                                 start));
 
 ListOfAssertedBoundName:
   extra-params: AssertedScopeKind scopeKind
   extra-args: scopeKind
   type-ok:
     Ok
   init: |
@@ -1178,113 +1178,113 @@ ListOfAssertedMaybePositionalParameterNa
 
 ListOfAssertedDeclaredName:
   inherits: ListOfAssertedBoundName
 
 ListOfDirective:
   type-ok:
     ListNode*
   init:
-    BINJS_TRY_DECL(result, factory_.newStatementList(tokenizer_->pos(start)));
+    BINJS_TRY_DECL(result, handler_.newStatementList(tokenizer_->pos(start)));
   append:
-    factory_.addStatementToList(result, item);
+    handler_.addStatementToList(result, item);
 
 ListOfObjectProperty:
   type-ok:
     ListNode*
   init:
-    BINJS_TRY_DECL(result, factory_.newObjectLiteral(start));
+    BINJS_TRY_DECL(result, handler_.newObjectLiteral(start));
   append: |
     if (!item->isConstant())
       result->setHasNonConstInitializer();
     result->appendWithoutOrderAssumption(item);
 
 ListOfOptionalSpreadElementOrExpression:
   type-ok:
     ListNode*
   init:
-    BINJS_TRY_DECL(result, factory_.newArrayLiteral(start));
+    BINJS_TRY_DECL(result, handler_.newArrayLiteral(start));
   append: |
     if (item) {
-      factory_.addArrayElement(result, item); // Infallible.
+      handler_.addArrayElement(result, item); // Infallible.
     } else {
-      BINJS_TRY(factory_.addElision(result, tokenizer_->pos(start)));
+      BINJS_TRY(handler_.addElision(result, tokenizer_->pos(start)));
     }
 
 ListOfParameter:
   type-ok:
     ListNode*
   init: |
     BINJS_TRY_DECL(result,
                    this->template new_<ListNode>(ParseNodeKind::ParamsBody,
                                                  tokenizer_->pos(start)));
   append:
-    factory_.addList(/* list = */ result, /* kid = */ item);
+    handler_.addList(/* list = */ result, /* kid = */ item);
 
 ListOfStatement:
   type-ok:
     ListNode*
   init:
-    BINJS_TRY_DECL(result, factory_.newStatementList(tokenizer_->pos(start)));
+    BINJS_TRY_DECL(result, handler_.newStatementList(tokenizer_->pos(start)));
   append:
-    factory_.addStatementToList(result, item);
+    handler_.addStatementToList(result, item);
 
 
 #ListOfSpreadElementOrExpression:
 #  type-ok:
 #    ListNode*
 #  init:
 #    BINJS_TRY_DECL(result,
 #                   this->template new_<ListNode>(ParseNodeKind::ParamsBody,
 #                                                 tokenizer_->pos()));
 #  append:
 #    result->appendWithoutOrderAssumption(item);
 
 ListOfSwitchCase:
   type-ok:
     ListNode*
   init:
-    BINJS_TRY_DECL(result, factory_.newStatementList(tokenizer_->pos(start)));
+    BINJS_TRY_DECL(result, handler_.newStatementList(tokenizer_->pos(start)));
   append:
-    factory_.addCaseStatementToList(result, item);
+    handler_.addCaseStatementToList(result, item);
 
 ListOfVariableDeclarator:
   extra-params: ParseNodeKind declarationListKind
   type-ok:
     ListNode*
   init: |
     BINJS_TRY_DECL(result,
-                   factory_.newDeclarationList(declarationListKind,
+                   handler_.newDeclarationList(declarationListKind,
                    tokenizer_->pos(start)));
 
 LiteralBooleanExpression:
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newBooleanLiteral(value, tokenizer_->pos(start)));
+                   handler_.newBooleanLiteral(value, tokenizer_->pos(start)));
 
 LiteralNumericExpression:
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newNumber(value, DecimalPoint::HasDecimal, tokenizer_->pos(start)));
+                   handler_.newNumber(value, DecimalPoint::HasDecimal, tokenizer_->pos(start)));
 
 LiteralNullExpression:
   build: |
-    BINJS_TRY_DECL(result, factory_.newNullLiteral(tokenizer_->pos(start)));
+    BINJS_TRY_DECL(result, handler_.newNullLiteral(tokenizer_->pos(start)));
 
 LiteralPropertyName:
   build: |
     ParseNode* result;
     uint32_t index;
     if (value->isIndex(&index)) {
       BINJS_TRY_VAR(result,
-                    factory_.newNumber(index, NoDecimal,
+                    handler_.newNumber(index, NoDecimal,
                                        TokenPos(start, tokenizer_->offset())));
     } else {
       BINJS_TRY_VAR(result,
-                    factory_.newObjectLiteralPropertyName(value,
+                    handler_.newObjectLiteralPropertyName(value,
                                                           tokenizer_->pos(start)));
     }
 
 LiteralRegExpExpression:
   fields:
     flags:
       block:
         replace: |
@@ -1309,27 +1309,27 @@ LiteralRegExpExpression:
     }
 
 
     Rooted<RegExpObject*> reobj(cx_);
     BINJS_TRY_VAR(reobj,
                   RegExpObject::create(cx_, pattern, reflags, TenuredObject));
 
     BINJS_TRY_DECL(result,
-                   factory_.newRegExp(reobj, tokenizer_->pos(start), *this));
+                   handler_.newRegExp(reobj, tokenizer_->pos(start), *this));
 
 LiteralStringExpression:
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newStringLiteral(value, tokenizer_->pos(start)));
+                   handler_.newStringLiteral(value, tokenizer_->pos(start)));
 
 NewExpression:
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newNewExpression(tokenizer_->pos(start).begin,
+                   handler_.newNewExpression(tokenizer_->pos(start).begin,
                                              callee, arguments));
 
 ObjectExpression:
   build:
     auto result = properties;
 
 OptionalCatchClause:
   type-ok:
@@ -1352,146 +1352,146 @@ ReturnStatement:
     if (!pc_->isFunctionBox()) {
       // Return statements are permitted only inside functions.
       return raiseInvalidKind("Toplevel Statement", kind);
     }
 
     pc_->functionBox()->usesReturn = true;
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newReturnStatement(expression,
+                   handler_.newReturnStatement(expression,
                                                tokenizer_->pos(start)));
 
 Script:
   fields:
     directives:
       after: |
         forceStrictIfNecessary(pc_->sc(), directives);
   build: |
     MOZ_TRY(checkClosedVars(pc_->varScope()));
     MOZ_TRY(prependDirectivesToBody(/* body = */ statements, directives));
     auto result = statements;
 
 ShorthandProperty:
   build: |
     MOZ_ASSERT(name->isKind(ParseNodeKind::Name));
-    MOZ_ASSERT(!factory_.isUsableAsObjectPropertyName(name));
+    MOZ_ASSERT(!handler_.isUsableAsObjectPropertyName(name));
     BINJS_TRY_DECL(propName,
-                   factory_.newObjectLiteralPropertyName(name->template as<NameNode>().name(),
+                   handler_.newObjectLiteralPropertyName(name->template as<NameNode>().name(),
                                                          tokenizer_->pos(start)));
 
     BINJS_TRY_DECL(result,
-                   factory_.newShorthandPropertyDefinition(propName, name));
+                   handler_.newShorthandPropertyDefinition(propName, name));
 
 SwitchCase:
   type-ok:
     CaseClause*
   build: |
-    BINJS_TRY_DECL(result, factory_.newCaseOrDefault(start, test, consequent));
+    BINJS_TRY_DECL(result, handler_.newCaseOrDefault(start, test, consequent));
 
 SwitchDefault:
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newCaseOrDefault(start, nullptr, consequent));
+                   handler_.newCaseOrDefault(start, nullptr, consequent));
 
 SwitchStatement:
   fields:
     discriminant:
       after: |
         ParseContext::Statement stmt(pc_, StatementKind::Switch);
   build: |
-    BINJS_TRY_DECL(scope, factory_.newLexicalScope(nullptr, cases));
+    BINJS_TRY_DECL(scope, handler_.newLexicalScope(nullptr, cases));
     BINJS_TRY_DECL(result,
-                   factory_.newSwitchStatement(start, discriminant, scope,
+                   handler_.newSwitchStatement(start, discriminant, scope,
                                                /* hasDefault = */ false));
 
 SwitchStatementWithDefault:
   fields:
     discriminant:
       after: |
         ParseContext::Statement stmt(pc_, StatementKind::Switch);
   build: |
     // Concatenate `preDefaultCase`, `defaultCase`, `postDefaultCase`
     auto cases = preDefaultCases;
-    factory_.addList(cases, defaultCase);
+    handler_.addList(cases, defaultCase);
     ParseNode* iter = postDefaultCases->head();
     while (iter) {
       ParseNode* next = iter->pn_next;
-      factory_.addList(cases, iter);
+      handler_.addList(cases, iter);
       iter = next;
     }
-    BINJS_TRY_DECL(scope, factory_.newLexicalScope(nullptr, cases));
+    BINJS_TRY_DECL(scope, handler_.newLexicalScope(nullptr, cases));
     BINJS_TRY_DECL(result,
-                   factory_.newSwitchStatement(start, discriminant, scope,
+                   handler_.newSwitchStatement(start, discriminant, scope,
                                                /* hasDefault = */ true));
 
 StaticMemberAssignmentTarget:
   init:
     size_t nameStart;
   fields:
     property:
       block:
         before: |
           nameStart = tokenizer_->offset();
   build: |
     BINJS_TRY_DECL(name,
-                   factory_.newPropertyName(property->asPropertyName(),
+                   handler_.newPropertyName(property->asPropertyName(),
                                             tokenizer_->pos(nameStart)));
-    BINJS_TRY_DECL(result, factory_.newPropertyAccess(object, name));
+    BINJS_TRY_DECL(result, handler_.newPropertyAccess(object, name));
 
 StaticMemberExpression:
   init:
     size_t nameStart;
   fields:
     property:
       block:
         before: |
           nameStart = tokenizer_->offset();
   build: |
     BINJS_TRY_DECL(name,
-                   factory_.newPropertyName(property->asPropertyName(),
+                   handler_.newPropertyName(property->asPropertyName(),
                    tokenizer_->pos(nameStart)));
-    BINJS_TRY_DECL(result, factory_.newPropertyAccess(object, name));
+    BINJS_TRY_DECL(result, handler_.newPropertyAccess(object, name));
 
 ThisExpression:
   build: |
     if (pc_->isFunctionBox()) {
       pc_->functionBox()->usesThis = true;
     }
 
     TokenPos pos = tokenizer_->pos(start);
     ParseNode* thisName(nullptr);
     if (pc_->sc()->thisBinding() == ThisBinding::Function) {
       HandlePropertyName dotThis = cx_->names().dotThis;
       BINJS_TRY(usedNames_.noteUse(cx_, dotThis, pc_->scriptId(),
                                    pc_->innermostScope()->id()));
-      BINJS_TRY_VAR(thisName, factory_.newName(dotThis, pos, cx_));
+      BINJS_TRY_VAR(thisName, handler_.newName(dotThis, pos, cx_));
     }
 
-    BINJS_TRY_DECL(result, factory_.newThisLiteral(pos, thisName));
+    BINJS_TRY_DECL(result, handler_.newThisLiteral(pos, thisName));
 
 ThrowStatement:
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newThrowStatement(expression,
+                   handler_.newThrowStatement(expression,
                                               tokenizer_->pos(start)));
 
 TryCatchStatement:
   fields:
     body:
       block:
         declare:
           ParseNode* body;
         before: |
           ParseContext::Statement stmt(pc_, StatementKind::Try);
           ParseContext::Scope scope(cx_, pc_, usedNames_);
           BINJS_TRY(scope.init(pc_));
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newTryStatement(start, body, catchClause,
+                   handler_.newTryStatement(start, body, catchClause,
                                             /* finallyBlock = */ nullptr));
 
 TryFinallyStatement:
   fields:
     body:
       block:
         declare:
           ParseNode* body;
@@ -1504,17 +1504,17 @@ TryFinallyStatement:
         declare:
           ParseNode* finalizer;
         before: |
           ParseContext::Statement stmt(pc_, StatementKind::Finally);
           ParseContext::Scope scope(cx_, pc_, usedNames_);
           BINJS_TRY(scope.init(pc_));
   build: |
     BINJS_TRY_DECL(result,
-                   factory_.newTryStatement(start, body, catchClause,
+                   handler_.newTryStatement(start, body, catchClause,
                                             finalizer));
 
 UnaryExpression:
   build: |
     ParseNodeKind pnk;
     switch (operator_) {
       case UnaryOperator::Minus:
         pnk = ParseNodeKind::NegExpr;
@@ -1554,32 +1554,32 @@ UnaryExpression:
             pnk = ParseNodeKind::DeleteElemExpr;
             break;
           default:
             pnk = ParseNodeKind::DeleteExpr;
         }
         break;
       }
     }
-    BINJS_TRY_DECL(result, factory_.newUnary(pnk, start, operand));
+    BINJS_TRY_DECL(result, handler_.newUnary(pnk, start, operand));
 
 UpdateExpression:
   build: |
     ParseNodeKind pnk;
     switch (operator_) {
       case UpdateOperator::Incr:
         pnk = isPrefix ? ParseNodeKind::PreIncrementExpr
                        : ParseNodeKind::PostIncrementExpr;
         break;
       case UpdateOperator::Decr:
         pnk = isPrefix ? ParseNodeKind::PreDecrementExpr
                        : ParseNodeKind::PostDecrementExpr;
         break;
     }
-    BINJS_TRY_DECL(result, factory_.newUnary(pnk, start, operand));
+    BINJS_TRY_DECL(result, handler_.newUnary(pnk, start, operand));
 
 VariableDeclaration:
   init:
     AutoVariableDeclarationKind kindGuard(this);
 
   fields:
     kind:
       after: |
@@ -1610,38 +1610,38 @@ VariableDeclarator:
   build: |
     ParseNode* result;
     if (binding->isKind(ParseNodeKind::Name)) {
       // `var foo [= bar]``
       NameNode* bindingNameNode = &binding->template as<NameNode>();
       MOZ_TRY(checkBinding(bindingNameNode->atom()->asPropertyName()));
       result = bindingNameNode;
       if (init) {
-        BINJS_TRY(factory_.finishInitializerAssignment(bindingNameNode, init));
+        BINJS_TRY(handler_.finishInitializerAssignment(bindingNameNode, init));
       }
     } else {
       // `var pattern = bar`
       if (!init) {
         // Here, `init` is required.
         return raiseMissingField("VariableDeclarator (with non-trivial pattern)",
                                  BinField::Init);
       }
 
       MOZ_CRASH("Unimplemented: AssertedScope check for BindingPattern variable declaration");
       BINJS_TRY_VAR(result,
-                    factory_.newAssignment(ParseNodeKind::AssignExpr, binding,
+                    handler_.newAssignment(ParseNodeKind::AssignExpr, binding,
                                            init));
     }
 
 WhileStatement:
   init:
     ParseContext::Statement stmt(pc_, StatementKind::WhileLoop);
   build:
-    BINJS_TRY_DECL(result, factory_.newWhileStatement(start, test, body));
+    BINJS_TRY_DECL(result, handler_.newWhileStatement(start, test, body));
 
 WithStatement:
   fields:
     body:
       before: |
         ParseContext::Statement stmt(pc_, StatementKind::With);
   build: |
     pc_->sc()->setBindingsAccessedDynamically();
-    BINJS_TRY_DECL(result, factory_.newWithStatement(start, object, body));
+    BINJS_TRY_DECL(result, handler_.newWithStatement(start, object, body));