Bug 1528837 - Part 11: Rename BinASTParserBase::parseContext_ field to pc_. r=Yoric
authorTooru Fujisawa <arai_a@mac.com>
Sun, 24 Feb 2019 03:31:04 +0000
changeset 521656 e6f7bf4fc43d5ad9a89eb34a4d06fc4429d52c43
parent 521655 7c2a4feaec2cc4c9e5b74e358aae41e0e9c56df9
child 521657 21b0cdf00414e525501ffd9088d194b20591565f
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [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 11: Rename BinASTParserBase::parseContext_ field to pc_. r=Yoric Differential Revision: https://phabricator.services.mozilla.com/D20223
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
@@ -688,22 +688,22 @@ JS::Result<ParseNode*> BinASTParser<Tok>
     const size_t start, const BinKind kind, const BinFields& fields) {
   ParseNode* result;
   switch (kind) {
     case BinKind::ArrayBinding:
       MOZ_TRY_VAR(result, parseInterfaceArrayBinding(start, kind, fields));
       break;
     case BinKind::BindingIdentifier:
       MOZ_TRY_VAR(result, parseInterfaceBindingIdentifier(start, kind, fields));
-      if (!parseContext_->positionalFormalParameterNames().append(
+      if (!pc_->positionalFormalParameterNames().append(
               result->template as<NameNode>().atom())) {
         return raiseOOM();
       }
-      if (parseContext_->isFunctionBox()) {
-        parseContext_->functionBox()->length++;
+      if (pc_->isFunctionBox()) {
+        pc_->functionBox()->length++;
       }
       break;
     case BinKind::BindingWithInitializer:
       MOZ_TRY_VAR(result,
                   parseInterfaceBindingWithInitializer(start, kind, fields));
       break;
     case BinKind::ObjectBinding:
       MOZ_TRY_VAR(result, parseInterfaceObjectBinding(start, kind, fields));
@@ -1351,24 +1351,23 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto scopeKind = AssertedScopeKind::Block;
 
   MOZ_TRY(parseListOfAssertedDeclaredName(scopeKind));
 
   BINJS_MOZ_TRY_DECL(hasDirectEval, tokenizer_->readBool());
   if (hasDirectEval) {
-    parseContext_->sc()->setHasDirectEval();
-    parseContext_->sc()->setBindingsAccessedDynamically();
+    pc_->sc()->setHasDirectEval();
+    pc_->sc()->setBindingsAccessedDynamically();
   }
-  if (hasDirectEval && parseContext_->isFunctionBox() &&
-      !parseContext_->sc()->strict()) {
+  if (hasDirectEval && pc_->isFunctionBox() && !pc_->sc()->strict()) {
     // In non-strict mode code, direct calls to eval can
     // add variables to the call object.
-    parseContext_->functionBox()->setHasExtensibleScope();
+    pc_->functionBox()->setHasExtensibleScope();
   }
   auto result = Ok();
   return result;
 }
 
 /*
  interface AssertedBoundName : Node {
     [IdentifierName] string name;
@@ -1456,24 +1455,23 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto scopeKind = AssertedScopeKind::Catch;
 
   MOZ_TRY(parseListOfAssertedBoundName(scopeKind));
 
   BINJS_MOZ_TRY_DECL(hasDirectEval, tokenizer_->readBool());
   if (hasDirectEval) {
-    parseContext_->sc()->setHasDirectEval();
-    parseContext_->sc()->setBindingsAccessedDynamically();
+    pc_->sc()->setHasDirectEval();
+    pc_->sc()->setBindingsAccessedDynamically();
   }
-  if (hasDirectEval && parseContext_->isFunctionBox() &&
-      !parseContext_->sc()->strict()) {
+  if (hasDirectEval && pc_->isFunctionBox() && !pc_->sc()->strict()) {
     // In non-strict mode code, direct calls to eval can
     // add variables to the call object.
-    parseContext_->functionBox()->setHasExtensibleScope();
+    pc_->functionBox()->setHasExtensibleScope();
   }
   auto result = Ok();
   return result;
 }
 
 /*
  interface AssertedDeclaredName : Node {
     [IdentifierName] string name;
@@ -1575,26 +1573,25 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
 #endif  // defined(DEBUG)
   const auto scopeKind = AssertedScopeKind::Parameter;
 
   MOZ_TRY(parseListOfAssertedMaybePositionalParameterName(scopeKind,
                                                           positionalParams));
 
   BINJS_MOZ_TRY_DECL(hasDirectEval, tokenizer_->readBool());
   if (hasDirectEval) {
-    parseContext_->sc()->setHasDirectEval();
-    parseContext_->sc()->setBindingsAccessedDynamically();
+    pc_->sc()->setHasDirectEval();
+    pc_->sc()->setBindingsAccessedDynamically();
   }
   BINJS_MOZ_TRY_DECL(isSimpleParameterList, tokenizer_->readBool());
   (void)isSimpleParameterList;
-  if (hasDirectEval && parseContext_->isFunctionBox() &&
-      !parseContext_->sc()->strict()) {
+  if (hasDirectEval && pc_->isFunctionBox() && !pc_->sc()->strict()) {
     // In non-strict mode code, direct calls to eval can
     // add variables to the call object.
-    parseContext_->functionBox()->setHasExtensibleScope();
+    pc_->functionBox()->setHasExtensibleScope();
   }
   auto result = Ok();
   return result;
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParser<Tok>::parseInterfaceAssertedPositionalParameterName(
     const size_t start, const BinKind kind, const BinFields& fields,
@@ -1603,17 +1600,17 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
   MOZ_ASSERT(kind == BinKind::AssertedPositionalParameterName);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
   const BinField expected_fields[3] = {BinField::Index, BinField::Name,
                                        BinField::IsCaptured};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
-  bool allowDuplicateName = !parseContext_->sc()->strict();
+  bool allowDuplicateName = !pc_->sc()->strict();
 
   BINJS_MOZ_TRY_DECL(index, tokenizer_->readUnsignedLong());
 
   RootedAtom name(cx_);
   MOZ_TRY_VAR(name, tokenizer_->readIdentifierName());
   // `positionalParams` vector can be shorter than the actual
   // parameter length. Resize on demand.
   // (see also ListOfAssertedMaybePositionalParameterName)
@@ -1682,24 +1679,23 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto scopeKind = AssertedScopeKind::Global;
 
   MOZ_TRY(parseListOfAssertedDeclaredName(scopeKind));
 
   BINJS_MOZ_TRY_DECL(hasDirectEval, tokenizer_->readBool());
   if (hasDirectEval) {
-    parseContext_->sc()->setHasDirectEval();
-    parseContext_->sc()->setBindingsAccessedDynamically();
+    pc_->sc()->setHasDirectEval();
+    pc_->sc()->setBindingsAccessedDynamically();
   }
-  if (hasDirectEval && parseContext_->isFunctionBox() &&
-      !parseContext_->sc()->strict()) {
+  if (hasDirectEval && pc_->isFunctionBox() && !pc_->sc()->strict()) {
     // In non-strict mode code, direct calls to eval can
     // add variables to the call object.
-    parseContext_->functionBox()->setHasExtensibleScope();
+    pc_->functionBox()->setHasExtensibleScope();
   }
   auto result = Ok();
   return result;
 }
 
 /*
  interface AssertedVarScope : Node {
     FrozenArray<AssertedDeclaredName> declaredNames;
@@ -1736,24 +1732,23 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   const auto scopeKind = AssertedScopeKind::Var;
 
   MOZ_TRY(parseListOfAssertedDeclaredName(scopeKind));
 
   BINJS_MOZ_TRY_DECL(hasDirectEval, tokenizer_->readBool());
   if (hasDirectEval) {
-    parseContext_->sc()->setHasDirectEval();
-    parseContext_->sc()->setBindingsAccessedDynamically();
+    pc_->sc()->setHasDirectEval();
+    pc_->sc()->setBindingsAccessedDynamically();
   }
-  if (hasDirectEval && parseContext_->isFunctionBox() &&
-      !parseContext_->sc()->strict()) {
+  if (hasDirectEval && pc_->isFunctionBox() && !pc_->sc()->strict()) {
     // In non-strict mode code, direct calls to eval can
     // add variables to the call object.
-    parseContext_->functionBox()->setHasExtensibleScope();
+    pc_->functionBox()->setHasExtensibleScope();
   }
   auto result = Ok();
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceAssignmentExpression(
     const size_t start, const BinKind kind, const BinFields& fields) {
@@ -1787,18 +1782,18 @@ BinASTParser<Tok>::parseInterfaceAssignm
 #endif  // defined(DEBUG)
 
   RootedAtom name(cx_);
   MOZ_TRY_VAR(name, tokenizer_->readIdentifierName());
 
   if (!IsIdentifier(name)) {
     return raiseError("Invalid identifier");
   }
-  BINJS_TRY(usedNames_.noteUse(cx_, name, parseContext_->scriptId(),
-                               parseContext_->innermostScope()->id()));
+  BINJS_TRY(usedNames_.noteUse(cx_, name, pc_->scriptId(),
+                               pc_->innermostScope()->id()));
   BINJS_TRY_DECL(result, factory_.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) {
@@ -2000,27 +1995,26 @@ JS::Result<ParseNode*> BinASTParser<Tok>
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::Block);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
   const BinField expected_fields[2] = {BinField::Scope, BinField::Statements};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
-  ParseContext::Statement stmt(parseContext_, StatementKind::Block);
-  ParseContext::Scope currentScope(cx_, parseContext_, usedNames_);
-  BINJS_TRY(currentScope.init(parseContext_));
+  ParseContext::Statement stmt(pc_, StatementKind::Block);
+  ParseContext::Scope currentScope(cx_, pc_, usedNames_);
+  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_, parseContext_));
+  BINJS_TRY_DECL(bindings, NewLexicalScopeData(cx_, currentScope, alloc_, pc_));
   BINJS_TRY_DECL(result, factory_.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);
@@ -2034,18 +2028,18 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   MOZ_TRY_VAR(label, tokenizer_->readMaybeAtom());
 
   if (label) {
     if (!IsIdentifier(label)) {
       return raiseError("Invalid identifier");
     }
   }
 
-  auto validity = parseContext_->checkBreakStatement(
-      label ? label->asPropertyName() : nullptr);
+  auto validity =
+      pc_->checkBreakStatement(label ? label->asPropertyName() : nullptr);
   if (validity.isErr()) {
     switch (validity.unwrapErr()) {
       case ParseContext::BreakStatementError::ToughBreak:
         this->error(JSMSG_TOUGH_BREAK);
         return cx_->alreadyReportedError();
       case ParseContext::BreakStatementError::LabelNotFound:
         this->error(JSMSG_LABEL_NOT_FOUND);
         return cx_->alreadyReportedError();
@@ -2074,36 +2068,34 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   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 (prop == cx_->names().apply) {
       op = JSOP_FUNAPPLY;
-      if (parseContext_->isFunctionBox()) {
-        parseContext_->functionBox()->usesApply = true;
+      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 (!parseContext_->varScope().lookupDeclaredNameForAdd(
-            cx_->names().eval) &&
-        !parseContext_->innermostScope()->lookupDeclaredNameForAdd(
-            cx_->names().eval)) {
+    if (!pc_->varScope().lookupDeclaredNameForAdd(cx_->names().eval) &&
+        !pc_->innermostScope()->lookupDeclaredNameForAdd(cx_->names().eval)) {
       // This is a direct call to `eval`.
-      if (!parseContext_->sc()->hasDirectEval()) {
+      if (!pc_->sc()->hasDirectEval()) {
         return raiseMissingDirectEvalInAssertedScope();
       }
 
-      op = parseContext_->sc()->strict() ? JSOP_STRICTEVAL : JSOP_EVAL;
+      op = pc_->sc()->strict() ? JSOP_STRICTEVAL : JSOP_EVAL;
     }
   }
 
   BINJS_TRY_DECL(result, factory_.newCall(callee, arguments));
   result->setOp(op);
   return result;
 }
 
@@ -2137,29 +2129,28 @@ JS::Result<LexicalScopeNode*> BinASTPars
   MOZ_ASSERT(kind == BinKind::CatchClause);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
   const BinField expected_fields[3] = {BinField::BindingScope,
                                        BinField::Binding, BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
-  ParseContext::Statement stmt(parseContext_, StatementKind::Catch);
-  ParseContext::Scope currentScope(cx_, parseContext_, usedNames_);
-  BINJS_TRY(currentScope.init(parseContext_));
+  ParseContext::Statement stmt(pc_, StatementKind::Catch);
+  ParseContext::Scope currentScope(cx_, pc_, usedNames_);
+  BINJS_TRY(currentScope.init(pc_));
 
   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_, parseContext_));
+  BINJS_TRY_DECL(bindings, NewLexicalScopeData(cx_, currentScope, alloc_, pc_));
   BINJS_TRY_DECL(result, factory_.newLexicalScope(*bindings, body));
   BINJS_TRY(factory_.setupCatchScope(result, binding, body));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceClassDeclaration(
     const size_t start, const BinKind kind, const BinFields& fields) {
@@ -2322,18 +2313,18 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   MOZ_TRY_VAR(label, tokenizer_->readMaybeAtom());
 
   if (label) {
     if (!IsIdentifier(label)) {
       return raiseError("ContinueStatement - Label MUST be an identifier");
     }
   }
 
-  auto validity = parseContext_->checkContinueStatement(
-      label ? label->asPropertyName() : nullptr);
+  auto validity =
+      pc_->checkContinueStatement(label ? label->asPropertyName() : nullptr);
   if (validity.isErr()) {
     switch (validity.unwrapErr()) {
       case ParseContext::ContinueStatementError::NotInALoop:
         this->error(JSMSG_BAD_CONTINUE);
         return cx_->alreadyReportedError();
       case ParseContext::ContinueStatementError::LabelNotFound:
         this->error(JSMSG_LABEL_NOT_FOUND);
         return cx_->alreadyReportedError();
@@ -2430,17 +2421,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::DoWhileStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
   const BinField expected_fields[2] = {BinField::Test, BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
-  ParseContext::Statement stmt(parseContext_, StatementKind::DoLoop);
+  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)));
   return result;
@@ -2506,27 +2497,27 @@ BinASTParser<Tok>::parseInterfaceEagerFu
                                           : nullptr));
 
   forceStrictIfNecessary(funbox, directives);
 
   // Push a new ParseContext. It will be used to parse `scope`, the arguments,
   // the function.
   BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
   BINJS_TRY(funpc.init());
-  parseContext_->functionScope().useAsVarScope(parseContext_);
-  MOZ_ASSERT(parseContext_->isFunctionBox());
-
-  ParseContext::Scope lexicalScope(cx_, parseContext_, usedNames_);
-  BINJS_TRY(lexicalScope.init(parseContext_));
+  pc_->functionScope().useAsVarScope(pc_);
+  MOZ_ASSERT(pc_->isFunctionBox());
+
+  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_, parseContext_));
+                 NewLexicalScopeData(cx_, lexicalScope, alloc_, pc_));
   BINJS_TRY_DECL(bodyScope, factory_.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(
@@ -2569,27 +2560,27 @@ JS::Result<ParseNode*> BinASTParser<Tok>
                                           : nullptr));
 
   forceStrictIfNecessary(funbox, directives);
 
   // Push a new ParseContext. It will be used to parse `scope`, the arguments,
   // the function.
   BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
   BINJS_TRY(funpc.init());
-  parseContext_->functionScope().useAsVarScope(parseContext_);
-  MOZ_ASSERT(parseContext_->isFunctionBox());
-
-  ParseContext::Scope lexicalScope(cx_, parseContext_, usedNames_);
-  BINJS_TRY(lexicalScope.init(parseContext_));
+  pc_->functionScope().useAsVarScope(pc_);
+  MOZ_ASSERT(pc_->isFunctionBox());
+
+  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_, parseContext_));
+                 NewLexicalScopeData(cx_, lexicalScope, alloc_, pc_));
   BINJS_TRY_DECL(bodyScope, factory_.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(
@@ -2624,21 +2615,21 @@ JS::Result<ParseNode*> BinASTParser<Tok>
                                           : nullptr));
 
   forceStrictIfNecessary(funbox, directives);
 
   // Push a new ParseContext. It will be used to parse `scope`, the arguments,
   // the function.
   BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
   BINJS_TRY(funpc.init());
-  parseContext_->functionScope().useAsVarScope(parseContext_);
-  MOZ_ASSERT(parseContext_->isFunctionBox());
-
-  ParseContext::Scope lexicalScope(cx_, parseContext_, usedNames_);
-  BINJS_TRY(lexicalScope.init(parseContext_));
+  pc_->functionScope().useAsVarScope(pc_);
+  MOZ_ASSERT(pc_->isFunctionBox());
+
+  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(
                              name, method, accessorType));
@@ -2687,21 +2678,21 @@ JS::Result<ParseNode*> BinASTParser<Tok>
                                           : nullptr));
 
   forceStrictIfNecessary(funbox, directives);
 
   // Push a new ParseContext. It will be used to parse `scope`, the arguments,
   // the function.
   BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
   BINJS_TRY(funpc.init());
-  parseContext_->functionScope().useAsVarScope(parseContext_);
-  MOZ_ASSERT(parseContext_->isFunctionBox());
-
-  ParseContext::Scope lexicalScope(cx_, parseContext_, usedNames_);
-  BINJS_TRY(lexicalScope.init(parseContext_));
+  pc_->functionScope().useAsVarScope(pc_);
+  MOZ_ASSERT(pc_->isFunctionBox());
+
+  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(
                              name, method, accessorType));
@@ -2743,21 +2734,21 @@ JS::Result<ParseNode*> BinASTParser<Tok>
                                           : nullptr));
 
   forceStrictIfNecessary(funbox, directives);
 
   // Push a new ParseContext. It will be used to parse `scope`, the arguments,
   // the function.
   BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
   BINJS_TRY(funpc.init());
-  parseContext_->functionScope().useAsVarScope(parseContext_);
-  MOZ_ASSERT(parseContext_->isFunctionBox());
-
-  ParseContext::Scope lexicalScope(cx_, parseContext_, usedNames_);
-  BINJS_TRY(lexicalScope.init(parseContext_));
+  pc_->functionScope().useAsVarScope(pc_);
+  MOZ_ASSERT(pc_->isFunctionBox());
+
+  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(
                              name, method, accessorType));
@@ -2835,40 +2826,39 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   MOZ_ASSERT(kind == BinKind::ForInStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
   const BinField expected_fields[3] = {BinField::Left, BinField::Right,
                                        BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
-  ParseContext::Statement stmt(parseContext_, StatementKind::ForInLoop);
+  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_, parseContext_, usedNames_);
-  BINJS_TRY(scope.init(parseContext_));
+  ParseContext::Scope scope(cx_, pc_, usedNames_);
+  BINJS_TRY(scope.init(pc_));
 
   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,
                                            tokenizer_->pos(start)));
   ParseNode* result;
   BINJS_TRY_VAR(result, factory_.newForStatement(start, forHead, body,
                                                  /* iflags = */ 0));
 
   if (!scope.isEmpty()) {
-    BINJS_TRY_DECL(bindings,
-                   NewLexicalScopeData(cx_, scope, alloc_, parseContext_));
+    BINJS_TRY_DECL(bindings, NewLexicalScopeData(cx_, scope, alloc_, pc_));
     BINJS_TRY_VAR(result, factory_.newLexicalScope(*bindings, result));
   }
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceForOfStatement(
     const size_t start, const BinKind kind, const BinFields& fields) {
@@ -2882,41 +2872,40 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   MOZ_ASSERT(kind == BinKind::ForStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
   const BinField expected_fields[4] = {BinField::Init, BinField::Test,
                                        BinField::Update, BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
-  ParseContext::Statement stmt(parseContext_, StatementKind::ForLoop);
+  ParseContext::Statement stmt(pc_, StatementKind::ForLoop);
 
   // Implicit scope around the `for`, used to store `for (let x; ...; ...)`
   // or `for (const x; ...; ...)`-style declarations. Detail on the
   // declaration is stored as part of `BINJS_Scope`.
-  ParseContext::Scope scope(cx_, parseContext_, usedNames_);
-  BINJS_TRY(scope.init(parseContext_));
+  ParseContext::Scope scope(cx_, pc_, usedNames_);
+  BINJS_TRY(scope.init(pc_));
 
   BINJS_MOZ_TRY_DECL(init, parseOptionalVariableDeclarationOrExpression());
 
   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)));
   ParseNode* result;
   BINJS_TRY_VAR(result, factory_.newForStatement(start, forHead, body,
                                                  /* iflags = */ 0));
 
   if (!scope.isEmpty()) {
-    BINJS_TRY_DECL(bindings,
-                   NewLexicalScopeData(cx_, scope, alloc_, parseContext_));
+    BINJS_TRY_DECL(bindings, NewLexicalScopeData(cx_, scope, alloc_, pc_));
     BINJS_TRY_VAR(result, factory_.newLexicalScope(*bindings, result));
   }
   return result;
 }
 
 /*
  interface FormalParameters : Node {
     FrozenArray<Parameter> items;
@@ -3010,17 +2999,17 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
                                        BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(isFunctionNameCaptured, tokenizer_->readBool());
   // Per spec, isFunctionNameCaptured can be true for anonymous
   // function.  Check isFunctionNameCaptured only for named
   // function.
-  if (parseContext_->functionBox()->function()->isNamedLambda() &&
+  if (pc_->functionBox()->function()->isNamedLambda() &&
       isFunctionNameCaptured) {
     captureFunctionName();
   }
   BINJS_MOZ_TRY_DECL(isThisCaptured, tokenizer_->readBool());
   // TODO: Use this in BinASTParser::buildFunction.
   (void)isThisCaptured;
   Rooted<GCVector<JSAtom*>> positionalParams(cx_, GCVector<JSAtom*>(cx_));
   MOZ_TRY(parseAssertedParameterScope(&positionalParams));
@@ -3192,18 +3181,18 @@ 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(usedNames_.noteUse(cx_, name, parseContext_->scriptId(),
-                               parseContext_->innermostScope()->id()));
+  BINJS_TRY(usedNames_.noteUse(cx_, name, pc_->scriptId(),
+                               pc_->innermostScope()->id()));
   BINJS_TRY_DECL(result, factory_.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) {
@@ -3238,17 +3227,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   RootedAtom label(cx_);
   MOZ_TRY_VAR(label, tokenizer_->readAtom());
   if (!IsIdentifier(label)) {
     return raiseError("Invalid identifier");
   }
-  ParseContext::LabelStatement stmt(parseContext_, label);
+  ParseContext::LabelStatement stmt(pc_, label);
   BINJS_MOZ_TRY_DECL(body, parseStatement());
 
   BINJS_TRY_DECL(result, factory_.newLabeledStatement(label->asPropertyName(),
                                                       body, start));
   return result;
 }
 
 template <typename Tok>
@@ -3314,18 +3303,18 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   RootedFunction fun(cx_, funbox->function());
 
   // TODO: This will become incorrect in the face of ES6 features.
   fun->setArgCount(length);
 
   auto skipStart = contentsSkip.startOffset();
   BINJS_TRY_DECL(
       lazy, LazyScript::Create(cx_, fun, sourceObject_,
-                               parseContext_->closedOverBindingsForLazy(),
-                               parseContext_->innerFunctionsForLazy, skipStart,
+                               pc_->closedOverBindingsForLazy(),
+                               pc_->innerFunctionsForLazy, skipStart,
                                skipStart + contentsSkip.length(), skipStart, 0,
                                skipStart, ParseGoal::Script));
 
   if (funbox->strict()) {
     lazy->setStrict();
   }
   lazy->setIsBinAST();
   funbox->function()->initLazyScript(lazy);
@@ -3379,18 +3368,18 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   RootedFunction fun(cx_, funbox->function());
 
   // TODO: This will become incorrect in the face of ES6 features.
   fun->setArgCount(length);
 
   auto skipStart = contentsSkip.startOffset();
   BINJS_TRY_DECL(
       lazy, LazyScript::Create(cx_, fun, sourceObject_,
-                               parseContext_->closedOverBindingsForLazy(),
-                               parseContext_->innerFunctionsForLazy, skipStart,
+                               pc_->closedOverBindingsForLazy(),
+                               pc_->innerFunctionsForLazy, skipStart,
                                skipStart + contentsSkip.length(), skipStart, 0,
                                skipStart, ParseGoal::Script));
 
   if (funbox->strict()) {
     lazy->setStrict();
   }
   lazy->setIsBinAST();
   funbox->function()->initLazyScript(lazy);
@@ -3638,22 +3627,22 @@ JS::Result<ParseNode*> BinASTParser<Tok>
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::ReturnStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
   const BinField expected_fields[1] = {BinField::Expression};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
-  if (!parseContext_->isFunctionBox()) {
+  if (!pc_->isFunctionBox()) {
     // Return statements are permitted only inside functions.
     return raiseInvalidKind("Toplevel Statement", kind);
   }
 
-  parseContext_->functionBox()->usesReturn = true;
+  pc_->functionBox()->usesReturn = true;
 
   BINJS_MOZ_TRY_DECL(expression, parseOptionalExpression());
 
   BINJS_TRY_DECL(
       result, factory_.newReturnStatement(expression, tokenizer_->pos(start)));
   return result;
 }
 
@@ -3667,20 +3656,20 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   const BinField expected_fields[3] = {BinField::Scope, BinField::Directives,
                                        BinField::Statements};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   MOZ_TRY(parseAssertedScriptGlobalScope());
 
   BINJS_MOZ_TRY_DECL(directives, parseListOfDirective());
-  forceStrictIfNecessary(parseContext_->sc(), directives);
+  forceStrictIfNecessary(pc_->sc(), directives);
   BINJS_MOZ_TRY_DECL(statements, parseListOfStatement());
 
-  MOZ_TRY(checkClosedVars(parseContext_->varScope()));
+  MOZ_TRY(checkClosedVars(pc_->varScope()));
   MOZ_TRY(prependDirectivesToBody(/* body = */ statements, directives));
   auto result = statements;
   return result;
 }
 
 /*
  interface SetterContents : Node {
     bool isThisCaptured;
@@ -3923,17 +3912,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
   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(parseContext_, StatementKind::Switch);
+  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,
                                                      /* hasDefault = */ false));
   return result;
 }
 
@@ -3947,17 +3936,17 @@ BinASTParser<Tok>::parseInterfaceSwitchS
 #if defined(DEBUG)
   const BinField expected_fields[4] = {
       BinField::Discriminant, BinField::PreDefaultCases, BinField::DefaultCase,
       BinField::PostDefaultCases};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(discriminant, parseExpression());
-  ParseContext::Statement stmt(parseContext_, StatementKind::Switch);
+  ParseContext::Statement stmt(pc_, StatementKind::Switch);
   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;
@@ -3984,26 +3973,26 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceThisExpression(
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::ThisExpression);
   BINJS_TRY(CheckRecursionLimit(cx_));
   MOZ_TRY(tokenizer_->checkFields0(kind, fields));
 
-  if (parseContext_->isFunctionBox()) {
-    parseContext_->functionBox()->usesThis = true;
+  if (pc_->isFunctionBox()) {
+    pc_->functionBox()->usesThis = true;
   }
 
   TokenPos pos = tokenizer_->pos(start);
   ParseNode* thisName(nullptr);
-  if (parseContext_->sc()->thisBinding() == ThisBinding::Function) {
+  if (pc_->sc()->thisBinding() == ThisBinding::Function) {
     HandlePropertyName dotThis = cx_->names().dotThis;
-    BINJS_TRY(usedNames_.noteUse(cx_, dotThis, parseContext_->scriptId(),
-                                 parseContext_->innermostScope()->id()));
+    BINJS_TRY(usedNames_.noteUse(cx_, dotThis, pc_->scriptId(),
+                                 pc_->innermostScope()->id()));
     BINJS_TRY_VAR(thisName, factory_.newName(dotThis, pos, cx_));
   }
 
   BINJS_TRY_DECL(result, factory_.newThisLiteral(pos, thisName));
   return result;
 }
 
 template <typename Tok>
@@ -4031,19 +4020,19 @@ JS::Result<ParseNode*> BinASTParser<Tok>
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
   const BinField expected_fields[2] = {BinField::Body, BinField::CatchClause};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   ParseNode* body;
   {
-    ParseContext::Statement stmt(parseContext_, StatementKind::Try);
-    ParseContext::Scope scope(cx_, parseContext_, usedNames_);
-    BINJS_TRY(scope.init(parseContext_));
+    ParseContext::Statement stmt(pc_, StatementKind::Try);
+    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,
                                           /* finallyBlock = */ nullptr));
@@ -4058,28 +4047,28 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
 #if defined(DEBUG)
   const BinField expected_fields[3] = {BinField::Body, BinField::CatchClause,
                                        BinField::Finalizer};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
   ParseNode* body;
   {
-    ParseContext::Statement stmt(parseContext_, StatementKind::Try);
-    ParseContext::Scope scope(cx_, parseContext_, usedNames_);
-    BINJS_TRY(scope.init(parseContext_));
+    ParseContext::Statement stmt(pc_, StatementKind::Try);
+    ParseContext::Scope scope(cx_, pc_, usedNames_);
+    BINJS_TRY(scope.init(pc_));
     MOZ_TRY_VAR(body, parseBlock());
   }
 
   BINJS_MOZ_TRY_DECL(catchClause, parseOptionalCatchClause());
   ParseNode* finalizer;
   {
-    ParseContext::Statement stmt(parseContext_, StatementKind::Finally);
-    ParseContext::Scope scope(cx_, parseContext_, usedNames_);
-    BINJS_TRY(scope.init(parseContext_));
+    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));
   return result;
 }
 
@@ -4124,17 +4113,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
       pnk = ParseNodeKind::VoidExpr;
       break;
     case UnaryOperator::Delete: {
       switch (operand->getKind()) {
         case ParseNodeKind::Name:
           operand->setOp(JSOP_DELNAME);
           pnk = ParseNodeKind::DeleteNameExpr;
           BINJS_TRY(this->strictModeError(JSMSG_DEPRECATED_DELETE_OPERAND));
-          parseContext_->sc()->setBindingsAccessedDynamically();
+          pc_->sc()->setBindingsAccessedDynamically();
           break;
         case ParseNodeKind::DotExpr:
           pnk = ParseNodeKind::DeletePropExpr;
           break;
         case ParseNodeKind::ElemExpr:
           pnk = ParseNodeKind::DeleteElemExpr;
           break;
         default:
@@ -4287,17 +4276,17 @@ JS::Result<ParseNode*> BinASTParser<Tok>
     const size_t start, const BinKind kind, const BinFields& fields) {
   MOZ_ASSERT(kind == BinKind::WhileStatement);
   BINJS_TRY(CheckRecursionLimit(cx_));
 
 #if defined(DEBUG)
   const BinField expected_fields[2] = {BinField::Test, BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
-  ParseContext::Statement stmt(parseContext_, StatementKind::WhileLoop);
+  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));
   return result;
 }
@@ -4310,20 +4299,20 @@ JS::Result<ParseNode*> BinASTParser<Tok>
 
 #if defined(DEBUG)
   const BinField expected_fields[2] = {BinField::Object, BinField::Body};
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(object, parseExpression());
 
-  ParseContext::Statement stmt(parseContext_, StatementKind::With);
+  ParseContext::Statement stmt(pc_, StatementKind::With);
   BINJS_MOZ_TRY_DECL(body, parseStatement());
 
-  parseContext_->sc()->setBindingsAccessedDynamically();
+  pc_->sc()->setBindingsAccessedDynamically();
   BINJS_TRY_DECL(result, factory_.newWithStatement(start, object, body));
   return result;
 }
 
 template <typename Tok>
 JS::Result<ParseNode*> BinASTParser<Tok>::parseInterfaceYieldExpression(
     const size_t start, const BinKind kind, const BinFields& fields) {
   return raiseError(
--- a/js/src/frontend/BinASTParser.h
+++ b/js/src/frontend/BinASTParser.h
@@ -69,17 +69,17 @@ class BinASTParser : public BinASTParser
  protected:
   // BinASTParserBase fields.
   using Base::cx_;
 
   using Base::alloc_;
   using Base::usedNames_;
 
   using Base::factory_;
-  using Base::parseContext_;
+  using Base::pc_;
   using Base::sourceObject_;
 
  protected:
   // BinASTParserPerTokenizer types.
   using AutoVariableDeclarationKind =
       typename Base::AutoVariableDeclarationKind;
 
  protected:
--- a/js/src/frontend/BinASTParserBase.cpp
+++ b/js/src/frontend/BinASTParserBase.cpp
@@ -21,17 +21,17 @@ BinASTParserBase::BinASTParserBase(JSCon
       cx_(cx),
       alloc_(alloc),
       traceListHead_(nullptr),
       usedNames_(usedNames),
       nodeAlloc_(cx, alloc),
       keepAtoms_(cx),
       sourceObject_(cx, sourceObject),
       lazyScript_(cx, lazyScript),
-      parseContext_(nullptr),
+      pc_(nullptr),
       factory_(cx, alloc, nullptr, SourceKind::Binary) {
   MOZ_ASSERT_IF(lazyScript, lazyScript->isBinAST());
   cx->frontendCollectionPool().addActiveCompilation();
   tempPoolMark_ = alloc.mark();
 }
 
 BinASTParserBase::~BinASTParserBase() {
   alloc_.release(tempPoolMark_);
@@ -43,16 +43,16 @@ BinASTParserBase::~BinASTParserBase() {
    */
   alloc_.freeAllIfHugeAndUnused();
 
   cx_->frontendCollectionPool().removeActiveCompilation();
 }
 
 bool BinASTParserBase::hasUsedName(HandlePropertyName name) {
   if (UsedNamePtr p = usedNames_.lookup(name)) {
-    return p->value().isUsedInScript(parseContext_->scriptId());
+    return p->value().isUsedInScript(pc_->scriptId());
   }
 
   return false;
 }
 
 }  // namespace frontend
 }  // namespace js
--- a/js/src/frontend/BinASTParserBase.h
+++ b/js/src/frontend/BinASTParserBase.h
@@ -69,17 +69,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* parseContext_;
+  ParseContext* pc_;
   FullParseHandler factory_;
 
   friend class BinParseContext;
 };
 
 }  // namespace frontend
 }  // namespace js
 
--- a/js/src/frontend/BinASTParserPerTokenizer.cpp
+++ b/js/src/frontend/BinASTParserPerTokenizer.cpp
@@ -115,17 +115,17 @@ JS::Result<ParseNode*> BinASTParserPerTo
   }
 
   MOZ_TRY(tokenizer_->readHeader());
 
   ParseNode* result(nullptr);
   MOZ_TRY_VAR(result, asFinalParser()->parseProgram());
 
   mozilla::Maybe<GlobalScope::Data*> bindings =
-      NewGlobalScopeData(cx_, varScope, alloc_, parseContext_);
+      NewGlobalScopeData(cx_, varScope, alloc_, pc_);
   if (!bindings) {
     return cx_->alreadyReportedError();
   }
   globalsc->bindings = *bindings;
 
   if (metadataPtr) {
     *metadataPtr = tokenizer_->takeMetadata();
   }
@@ -162,29 +162,29 @@ JS::Result<FunctionNode*> BinASTParserPe
   BINJS_MOZ_TRY_DECL(
       funbox, buildFunctionBox(lazyScript_->generatorKind(),
                                lazyScript_->asyncKind(), syntaxKind, nullptr));
 
   // Push a new ParseContext. It will be used to parse `scope`, the arguments,
   // the function.
   BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
   BINJS_TRY(funpc.init());
-  parseContext_->functionScope().useAsVarScope(parseContext_);
-  MOZ_ASSERT(parseContext_->isFunctionBox());
+  pc_->functionScope().useAsVarScope(pc_);
+  MOZ_ASSERT(pc_->isFunctionBox());
 
-  ParseContext::Scope lexicalScope(cx_, parseContext_, usedNames_);
-  BINJS_TRY(lexicalScope.init(parseContext_));
+  ParseContext::Scope lexicalScope(cx_, pc_, usedNames_);
+  BINJS_TRY(lexicalScope.init(pc_));
   ListNode* params;
   ListNode* tmpBody;
   auto parseFunc = isExpr ? &FinalParser::parseFunctionExpressionContents
                           : &FinalParser::parseFunctionOrMethodContents;
   MOZ_TRY((asFinalParser()->*parseFunc)(func->nargs(), &params, &tmpBody));
 
   BINJS_TRY_DECL(lexicalScopeData,
-                 NewLexicalScopeData(cx_, lexicalScope, alloc_, parseContext_));
+                 NewLexicalScopeData(cx_, lexicalScope, alloc_, pc_));
   BINJS_TRY_DECL(body, factory_.newLexicalScope(*lexicalScopeData, tmpBody));
 
   auto binKind = isExpr ? BinKind::LazyFunctionExpression
                         : BinKind::LazyFunctionDeclaration;
   return buildFunction(firstOffset, binKind, nullptr, params, body, funbox);
 }
 
 template <typename Tok>
@@ -199,66 +199,65 @@ void BinASTParserPerTokenizer<Tok>::forc
     }
   }
 }
 
 template <typename Tok>
 JS::Result<FunctionBox*> BinASTParserPerTokenizer<Tok>::buildFunctionBox(
     GeneratorKind generatorKind, FunctionAsyncKind functionAsyncKind,
     FunctionSyntaxKind syntax, ParseNode* name) {
-  MOZ_ASSERT_IF(!parseContext_, lazyScript_);
+  MOZ_ASSERT_IF(!pc_, lazyScript_);
 
   RootedAtom atom(cx_);
 
   // Name might be any of {Identifier,ComputedPropertyName,LiteralPropertyName}
   if (name && name->is<NameNode>()) {
     atom = name->as<NameNode>().atom();
   }
 
-  if (parseContext_ && syntax == FunctionSyntaxKind::Statement) {
-    auto ptr = parseContext_->varScope().lookupDeclaredName(atom);
+  if (pc_ && syntax == FunctionSyntaxKind::Statement) {
+    auto ptr = pc_->varScope().lookupDeclaredName(atom);
     if (!ptr) {
       return raiseError(
           "FunctionDeclaration without corresponding AssertedDeclaredName.");
     }
 
     // FIXME: Should be merged with ParseContext::tryDeclareVarHelper
     //        (bug 1499044).
     DeclarationKind declaredKind = ptr->value()->kind();
     if (DeclarationKindIsVar(declaredKind)) {
       MOZ_ASSERT(declaredKind != DeclarationKind::VarForAnnexBLexicalFunction);
       ptr->value()->alterKind(DeclarationKind::BodyLevelFunction);
     }
   }
 
   // Allocate the function before walking down the tree.
   RootedFunction fun(cx_);
-  BINJS_TRY_VAR(fun, !parseContext_
-                         ? lazyScript_->functionNonDelazifying()
-                         : AllocNewFunction(cx_, atom, syntax, generatorKind,
-                                            functionAsyncKind, nullptr));
-  MOZ_ASSERT_IF(parseContext_, fun->explicitName() == atom);
+  BINJS_TRY_VAR(fun, !pc_ ? lazyScript_->functionNonDelazifying()
+                          : AllocNewFunction(cx_, atom, syntax, generatorKind,
+                                             functionAsyncKind, nullptr));
+  MOZ_ASSERT_IF(pc_, fun->explicitName() == atom);
 
   mozilla::Maybe<Directives> directives;
-  if (parseContext_) {
-    directives.emplace(parseContext_);
+  if (pc_) {
+    directives.emplace(pc_);
   } else {
     directives.emplace(lazyScript_->strict());
   }
 
   auto* funbox = alloc_.new_<FunctionBox>(
       cx_, traceListHead_, fun, /* toStringStart = */ 0, *directives,
       /* extraWarning = */ false, generatorKind, functionAsyncKind);
   if (!funbox) {
     return raiseOOM();
   }
 
   traceListHead_ = funbox;
-  if (parseContext_) {
-    funbox->initWithEnclosingParseContext(parseContext_, syntax);
+  if (pc_) {
+    funbox->initWithEnclosingParseContext(pc_, syntax);
   } else {
     funbox->initFromLazyFunction();
   }
   return funbox;
 }
 
 FunctionSyntaxKind BinKindToFunctionSyntaxKind(const BinKind kind) {
   // FIXME: this doesn't cover FunctionSyntaxKind::ClassConstructor and
@@ -322,96 +321,92 @@ JS::Result<FunctionNode*> BinASTParserPe
   factory_.setFunctionFormalParametersAndBody(result, params);
 
   HandlePropertyName dotThis = cx_->names().dotThis;
   const bool declareThis = hasUsedName(dotThis) ||
                            funbox->bindingsAccessedDynamically() ||
                            funbox->isDerivedClassConstructor();
 
   if (declareThis) {
-    ParseContext::Scope& funScope = parseContext_->functionScope();
+    ParseContext::Scope& funScope = pc_->functionScope();
     ParseContext::Scope::AddDeclaredNamePtr p =
         funScope.lookupDeclaredNameForAdd(dotThis);
     MOZ_ASSERT(!p);
-    BINJS_TRY(funScope.addDeclaredName(parseContext_, p, dotThis,
-                                       DeclarationKind::Var,
+    BINJS_TRY(funScope.addDeclaredName(pc_, p, dotThis, DeclarationKind::Var,
                                        DeclaredNameInfo::npos));
     funbox->setHasThisBinding();
 
     // TODO (efaust): This capture will have to come from encoder side for arrow
     // functions.
   }
 
   // This models PerHandlerParser::declaeFunctionArgumentsObject, with some
   // subtleties removed, as they don't yet apply to us.
   HandlePropertyName arguments = cx_->names().arguments;
   if (hasUsedName(arguments) ||
-      parseContext_->functionBox()->bindingsAccessedDynamically()) {
+      pc_->functionBox()->bindingsAccessedDynamically()) {
     funbox->usesArguments = true;
 
-    ParseContext::Scope& funScope = parseContext_->functionScope();
+    ParseContext::Scope& funScope = pc_->functionScope();
     ParseContext::Scope::AddDeclaredNamePtr p =
         funScope.lookupDeclaredNameForAdd(arguments);
     if (!p) {
-      BINJS_TRY(funScope.addDeclaredName(parseContext_, p, arguments,
-                                         DeclarationKind::Var,
-                                         DeclaredNameInfo::npos));
+      BINJS_TRY(funScope.addDeclaredName(
+          pc_, p, arguments, DeclarationKind::Var, DeclaredNameInfo::npos));
       funbox->declaredArguments = true;
     } else if (p->value()->kind() != DeclarationKind::Var) {
       // Lexicals, formal parameters, and body level functions shadow.
       funbox->usesArguments = false;
     }
 
     if (funbox->usesArguments) {
       funbox->setArgumentsHasLocalBinding();
 
-      if (parseContext_->sc()->bindingsAccessedDynamically() ||
-          parseContext_->sc()->hasDebuggerStatement()) {
+      if (pc_->sc()->bindingsAccessedDynamically() ||
+          pc_->sc()->hasDebuggerStatement()) {
         funbox->setDefinitelyNeedsArgsObj();
       }
     }
   }
 
   if (funbox->needsDotGeneratorName()) {
-    ParseContext::Scope& funScope = parseContext_->functionScope();
+    ParseContext::Scope& funScope = pc_->functionScope();
     HandlePropertyName dotGenerator = cx_->names().dotGenerator;
     ParseContext::Scope::AddDeclaredNamePtr p =
         funScope.lookupDeclaredNameForAdd(dotGenerator);
     if (!p) {
-      BINJS_TRY(funScope.addDeclaredName(parseContext_, p, dotGenerator,
-                                         DeclarationKind::Var,
-                                         DeclaredNameInfo::npos));
+      BINJS_TRY(funScope.addDeclaredName(
+          pc_, p, dotGenerator, DeclarationKind::Var, DeclaredNameInfo::npos));
     }
 
-    BINJS_TRY(usedNames_.noteUse(cx_, dotGenerator, parseContext_->scriptId(),
-                                 parseContext_->innermostScope()->id()));
+    BINJS_TRY(usedNames_.noteUse(cx_, dotGenerator, pc_->scriptId(),
+                                 pc_->innermostScope()->id()));
 
     BINJS_TRY_DECL(
         dotGen, factory_.newName(dotGenerator,
                                  tokenizer_->pos(tokenizer_->offset()), cx_));
 
     ListNode* stmtList =
         &body->as<LexicalScopeNode>().scopeBody()->as<ListNode>();
     BINJS_TRY(factory_.prependInitialYield(stmtList, dotGen));
   }
 
   // Check all our bindings after maybe adding function metavars.
   MOZ_TRY(checkFunctionClosedVars());
 
-  BINJS_TRY_DECL(bindings,
-                 NewFunctionScopeData(cx_, parseContext_->functionScope(),
-                                      /* hasParameterExprs = */ false, alloc_,
-                                      parseContext_));
+  BINJS_TRY_DECL(bindings, NewFunctionScopeData(cx_, pc_->functionScope(),
+                                                /* hasParameterExprs = */ false,
+                                                alloc_, pc_));
 
   funbox->functionScopeBindings().set(*bindings);
 
   if (funbox->function()->isNamedLambda()) {
-    BINJS_TRY_DECL(recursiveBinding,
-                   NewLexicalScopeData(cx_, parseContext_->namedLambdaScope(),
-                                       alloc_, parseContext_));
+    BINJS_TRY_DECL(
+        recursiveBinding,
+        NewLexicalScopeData(cx_, pc_->namedLambdaScope(), alloc_, pc_));
 
     funbox->namedLambdaBindings().set(*recursiveBinding);
   }
 
   return result;
 }
 
 template <typename Tok>
@@ -421,38 +416,37 @@ JS::Result<Ok> BinASTParserPerTokenizer<
   auto ptr = scope->lookupDeclaredNameForAdd(name);
   if (ptr) {
     if (allowDuplicateName) {
       return Ok();
     }
     return raiseError("Variable redeclaration");
   }
 
-  BINJS_TRY(scope->addDeclaredName(parseContext_, ptr, name.get(), declKind,
+  BINJS_TRY(scope->addDeclaredName(pc_, ptr, name.get(), declKind,
                                    tokenizer_->offset()));
 
   if (isCaptured) {
     auto declaredPtr = scope->lookupDeclaredName(name);
     MOZ_ASSERT(declaredPtr);
     declaredPtr->value()->setClosedOver();
   }
 
   return Ok();
 }
 
 template <typename Tok>
 void BinASTParserPerTokenizer<Tok>::captureFunctionName() {
-  MOZ_ASSERT(parseContext_->isFunctionBox());
-  MOZ_ASSERT(parseContext_->functionBox()->function()->isNamedLambda());
+  MOZ_ASSERT(pc_->isFunctionBox());
+  MOZ_ASSERT(pc_->functionBox()->function()->isNamedLambda());
 
-  RootedAtom funName(cx_,
-                     parseContext_->functionBox()->function()->explicitName());
+  RootedAtom funName(cx_, pc_->functionBox()->function()->explicitName());
   MOZ_ASSERT(funName);
 
-  auto ptr = parseContext_->namedLambdaScope().lookupDeclaredName(funName);
+  auto ptr = pc_->namedLambdaScope().lookupDeclaredName(funName);
   MOZ_ASSERT(ptr);
   ptr->value()->setClosedOver();
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParserPerTokenizer<Tok>::getDeclaredScope(
     AssertedScopeKind scopeKind, AssertedDeclaredKind kind,
     ParseContext::Scope*& scope, DeclarationKind& declKind) {
@@ -460,62 +454,62 @@ JS::Result<Ok> BinASTParserPerTokenizer<
              scopeKind == AssertedScopeKind::Global ||
              scopeKind == AssertedScopeKind::Var);
   switch (kind) {
     case AssertedDeclaredKind::Var:
       if (scopeKind == AssertedScopeKind::Block) {
         return raiseError("AssertedBlockScope cannot contain 'var' binding");
       }
       declKind = DeclarationKind::Var;
-      scope = &parseContext_->varScope();
+      scope = &pc_->varScope();
       break;
     case AssertedDeclaredKind::NonConstLexical:
       declKind = DeclarationKind::Let;
-      scope = parseContext_->innermostScope();
+      scope = pc_->innermostScope();
       break;
     case AssertedDeclaredKind::ConstLexical:
       declKind = DeclarationKind::Const;
-      scope = parseContext_->innermostScope();
+      scope = pc_->innermostScope();
       break;
   }
 
   return Ok();
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParserPerTokenizer<Tok>::getBoundScope(
     AssertedScopeKind scopeKind, ParseContext::Scope*& scope,
     DeclarationKind& declKind) {
   MOZ_ASSERT(scopeKind == AssertedScopeKind::Catch ||
              scopeKind == AssertedScopeKind::Parameter);
   switch (scopeKind) {
     case AssertedScopeKind::Catch:
       declKind = DeclarationKind::CatchParameter;
-      scope = parseContext_->innermostScope();
+      scope = pc_->innermostScope();
       break;
     case AssertedScopeKind::Parameter:
-      MOZ_ASSERT(parseContext_->isFunctionBox());
+      MOZ_ASSERT(pc_->isFunctionBox());
       declKind = DeclarationKind::PositionalFormalParameter;
-      scope = &parseContext_->functionScope();
+      scope = &pc_->functionScope();
       break;
     default:
       MOZ_ASSERT_UNREACHABLE("Unexpected AssertedScopeKind");
       break;
   }
 
   return Ok();
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParserPerTokenizer<Tok>::checkBinding(JSAtom* name) {
   // Check that the variable appears in the corresponding scope.
   ParseContext::Scope& scope =
       variableDeclarationKind_ == VariableDeclarationKind::Var
-          ? parseContext_->varScope()
-          : *parseContext_->innermostScope();
+          ? pc_->varScope()
+          : *pc_->innermostScope();
 
   auto ptr = scope.lookupDeclaredName(name->asPropertyName());
   if (!ptr) {
     return raiseMissingVariableInAssertedScope(name);
   }
 
   return Ok();
 }
@@ -532,17 +526,17 @@ JS::Result<Ok> BinASTParserPerTokenizer<
   // `params` corresponds to `parseTree` in 3.1.9 CheckAssertedScope, and
   // `positionalParamNames` parameter
 
   // Steps 1-3.
   // PositionalParameterNames (3.1.9 CheckAssertedScope step 5.d) and
   // CreatePositionalParameterIndices (3.1.5 CheckPositionalParameterIndices
   // step 1) are done implicitly.
   uint32_t i = 0;
-  const bool hasRest = parseContext_->functionBox()->hasRest();
+  const bool hasRest = pc_->functionBox()->hasRest();
   for (ParseNode* param : params->contents()) {
     if (param->isKind(ParseNodeKind::AssignExpr)) {
       param = param->as<AssignmentNode>().left();
     }
 
     // At this point, function body is not part of params list.
     const bool isRest = hasRest && !param->pn_next;
     if (isRest) {
@@ -618,48 +612,46 @@ JS::Result<Ok> BinASTParserPerTokenizer<
   return Ok();
 }
 
 // Binary AST (revision 8eab67e0c434929a66ff6abe99ff790bca087dda)
 // 3.1.13 CheckFunctionLength.
 template <typename Tok>
 JS::Result<Ok> BinASTParserPerTokenizer<Tok>::checkFunctionLength(
     uint32_t expectedLength) {
-  if (parseContext_->functionBox()->length != expectedLength) {
+  if (pc_->functionBox()->length != expectedLength) {
     return raiseError("Function length does't match");
   }
   return Ok();
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParserPerTokenizer<Tok>::checkClosedVars(
     ParseContext::Scope& scope) {
-  for (ParseContext::Scope::BindingIter bi = scope.bindings(parseContext_); bi;
-       bi++) {
+  for (ParseContext::Scope::BindingIter bi = scope.bindings(pc_); bi; bi++) {
     if (UsedNamePtr p = usedNames_.lookup(bi.name())) {
       bool closedOver;
-      p->value().noteBoundInScope(parseContext_->scriptId(), scope.id(),
-                                  &closedOver);
+      p->value().noteBoundInScope(pc_->scriptId(), scope.id(), &closedOver);
       if (closedOver && !bi.closedOver()) {
         return raiseInvalidClosedVar(bi.name());
       }
     }
   }
 
   return Ok();
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParserPerTokenizer<Tok>::checkFunctionClosedVars() {
-  MOZ_ASSERT(parseContext_->isFunctionBox());
+  MOZ_ASSERT(pc_->isFunctionBox());
 
-  MOZ_TRY(checkClosedVars(*parseContext_->innermostScope()));
-  MOZ_TRY(checkClosedVars(parseContext_->functionScope()));
-  if (parseContext_->functionBox()->function()->isNamedLambda()) {
-    MOZ_TRY(checkClosedVars(parseContext_->namedLambdaScope()));
+  MOZ_TRY(checkClosedVars(*pc_->innermostScope()));
+  MOZ_TRY(checkClosedVars(pc_->functionScope()));
+  if (pc_->functionBox()->function()->isNamedLambda()) {
+    MOZ_TRY(checkClosedVars(pc_->namedLambdaScope()));
   }
 
   return Ok();
 }
 
 template <typename Tok>
 JS::Result<Ok> BinASTParserPerTokenizer<Tok>::prependDirectivesToBody(
     ListNode* body, ListNode* directives) {
--- a/js/src/frontend/BinASTParserPerTokenizer.h
+++ b/js/src/frontend/BinASTParserPerTokenizer.h
@@ -201,19 +201,17 @@ class BinASTParserPerTokenizer : public 
   const JS::ReadOnlyCompileOptions& options_;
 
   const JS::ReadOnlyCompileOptions& options() const override {
     return this->options_;
   }
 
   JSContext* getContext() const override { return cx_; };
 
-  MOZ_MUST_USE bool strictMode() const override {
-    return parseContext_->sc()->strict();
-  }
+  MOZ_MUST_USE bool strictMode() const override { return pc_->sc()->strict(); }
 
   MOZ_MUST_USE bool computeErrorMetadata(ErrorMetadata* err,
                                          const ErrorOffset& offset) override;
 
  private:
   void doTrace(JSTracer* trc) final;
 
  public:
@@ -317,17 +315,17 @@ class BinASTParserPerTokenizer : public 
   inline const FinalParser* asFinalParser() const;
 };
 
 class BinParseContext : public ParseContext {
  public:
   template <typename Tok>
   BinParseContext(JSContext* cx, BinASTParserPerTokenizer<Tok>* parser,
                   SharedContext* sc, Directives* newDirectives)
-      : ParseContext(cx, parser->parseContext_, sc, *parser, parser->usedNames_,
+      : ParseContext(cx, parser->pc_, sc, *parser, parser->usedNames_,
                      newDirectives, /* isFull = */ true) {}
 };
 
 extern template class BinASTParserPerTokenizer<BinTokenReaderMultipart>;
 
 }  // namespace frontend
 }  // namespace js
 
--- a/js/src/frontend/BinSource.yaml
+++ b/js/src/frontend/BinSource.yaml
@@ -142,17 +142,17 @@ hpp:
        protected:
         // BinASTParserBase fields.
         using Base::cx_;
 
         using Base::alloc_;
         using Base::usedNames_;
 
         using Base::sourceObject_;
-        using Base::parseContext_;
+        using Base::pc_;
         using Base::factory_;
 
        protected:
         // BinASTParserPerTokenizer types.
         using AutoVariableDeclarationKind =
             typename Base::AutoVariableDeclarationKind;
 
        protected:
@@ -365,25 +365,25 @@ AssertedBlockScope:
   init: |
     const auto scopeKind = AssertedScopeKind::Block;
   fields:
     declaredNames:
       extra-args: scopeKind
     hasDirectEval:
       after: |
         if (hasDirectEval) {
-          parseContext_->sc()->setHasDirectEval();
-          parseContext_->sc()->setBindingsAccessedDynamically();
+          pc_->sc()->setHasDirectEval();
+          pc_->sc()->setBindingsAccessedDynamically();
         }
   build: |
-    if (hasDirectEval && parseContext_->isFunctionBox() &&
-        !parseContext_->sc()->strict()) {
+    if (hasDirectEval && pc_->isFunctionBox() &&
+        !pc_->sc()->strict()) {
       // In non-strict mode code, direct calls to eval can
       // add variables to the call object.
-      parseContext_->functionBox()->setHasExtensibleScope();
+      pc_->functionBox()->setHasExtensibleScope();
     }
     auto result = Ok();
 
 AssertedBoundName:
   type-ok:
     Ok
   extra-params: AssertedScopeKind scopeKind
   extra-args: scopeKind
@@ -428,17 +428,17 @@ AssertedMaybePositionalParameterName:
     AssertedRestParameterName:
       disabled: true
     AssertedParameterName:
       disabled: true
 
 AssertedPositionalParameterName:
   inherits: AssertedMaybePositionalParameterName
   init: |
-    bool allowDuplicateName = !parseContext_->sc()->strict();
+    bool allowDuplicateName = !pc_->sc()->strict();
   fields:
     name:
       after: |
         // `positionalParams` vector can be shorter than the actual
         // parameter length. Resize on demand.
         // (see also ListOfAssertedMaybePositionalParameterName)
         size_t prevLength = positionalParams.get().length();
         if (index >= prevLength) {
@@ -497,18 +497,18 @@ AssignmentExpression:
                    factory_.newAssignment(ParseNodeKind::AssignExpr,
                                           binding, expression));
 
 AssignmentTargetIdentifier:
   build: |
     if (!IsIdentifier(name)) {
       return raiseError("Invalid identifier");
     }
-    BINJS_TRY(usedNames_.noteUse(cx_, name, parseContext_->scriptId(),
-                                 parseContext_->innermostScope()->id()));
+    BINJS_TRY(usedNames_.noteUse(cx_, name, pc_->scriptId(),
+                                 pc_->innermostScope()->id()));
     BINJS_TRY_DECL(result,
                    factory_.newName(name->asPropertyName(),
                                     tokenizer_->pos(start), cx_));
 
 BindingIdentifier:
   build: |
     if (!IsIdentifier(name)) {
       return raiseError("Invalid identifier");
@@ -609,24 +609,23 @@ BinaryExpression:
 
       list->appendWithoutOrderAssumption(left);
       list->appendWithoutOrderAssumption(right);
       result = list;
     }
 
 Block:
   init: |
-    ParseContext::Statement stmt(parseContext_, StatementKind::Block);
-    ParseContext::Scope currentScope(cx_, parseContext_, usedNames_);
-    BINJS_TRY(currentScope.init(parseContext_));
+    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_,
-                                       parseContext_));
+                   NewLexicalScopeData(cx_, currentScope, alloc_, pc_));
     BINJS_TRY_DECL(result, factory_.newLexicalScope(*bindings, statements));
 
 BreakStatement:
   fields:
     label:
       block:
         replace: |
           RootedAtom label(cx_);
@@ -635,18 +634,17 @@ BreakStatement:
   build: |
     if (label) {
       if (!IsIdentifier(label)) {
         return raiseError("Invalid identifier");
       }
     }
 
     auto validity
-        = parseContext_->checkBreakStatement(label ? label->asPropertyName()
-                                                    : nullptr);
+        = pc_->checkBreakStatement(label ? label->asPropertyName() : nullptr);
     if (validity.isErr()) {
       switch (validity.unwrapErr()) {
         case ParseContext::BreakStatementError::ToughBreak:
           this->error(JSMSG_TOUGH_BREAK);
           return cx_->alreadyReportedError();
         case ParseContext::BreakStatementError::LabelNotFound:
           this->error(JSMSG_LABEL_NOT_FOUND);
           return cx_->alreadyReportedError();
@@ -661,52 +659,51 @@ BreakStatement:
 CallExpression:
   build: |
     auto op = JSOP_CALL;
 
     // Try to optimize funcall and funapply at the bytecode level
     if (PropertyName* prop = factory_.maybeDottedProperty(callee)) {
       if (prop == cx_->names().apply) {
         op = JSOP_FUNAPPLY;
-        if (parseContext_->isFunctionBox()) {
-          parseContext_->functionBox()->usesApply = true;
+        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 (!parseContext_->varScope().lookupDeclaredNameForAdd(cx_->names().eval) &&
-          !parseContext_->innermostScope()->lookupDeclaredNameForAdd(cx_->names().eval)) {
+      if (!pc_->varScope().lookupDeclaredNameForAdd(cx_->names().eval) &&
+          !pc_->innermostScope()->lookupDeclaredNameForAdd(cx_->names().eval)) {
         // This is a direct call to `eval`.
-        if (!parseContext_->sc()->hasDirectEval()) {
+        if (!pc_->sc()->hasDirectEval()) {
           return raiseMissingDirectEvalInAssertedScope();
         }
 
-        op = parseContext_->sc()->strict() ? JSOP_STRICTEVAL : JSOP_EVAL;
+        op = pc_->sc()->strict() ? JSOP_STRICTEVAL : JSOP_EVAL;
       }
     }
 
     BINJS_TRY_DECL(result, factory_.newCall(callee, arguments));
     result->setOp(op);
 
 CatchClause:
   type-ok:
     LexicalScopeNode*
   init: |
-    ParseContext::Statement stmt(parseContext_, StatementKind::Catch);
-    ParseContext::Scope currentScope(cx_, parseContext_, usedNames_);
-    BINJS_TRY(currentScope.init(parseContext_));
+    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_,
-                                       parseContext_));
+                   NewLexicalScopeData(cx_, currentScope, alloc_, pc_));
     BINJS_TRY_DECL(result, factory_.newLexicalScope(*bindings, body));
     BINJS_TRY(factory_.setupCatchScope(result, binding, body));
 
 CompoundAssignmentExpression:
   build: |
     ParseNodeKind pnk;
     switch (operator_){
       case CompoundAssignmentOperator::PlusAssign:
@@ -776,18 +773,17 @@ ContinueStatement:
   build: |
     if (label) {
       if (!IsIdentifier(label)) {
         return raiseError("ContinueStatement - Label MUST be an identifier");
       }
     }
 
     auto validity
-        = parseContext_->checkContinueStatement(label ? label->asPropertyName()
-                                                      : nullptr);
+        = pc_->checkContinueStatement(label ? label->asPropertyName() : nullptr);
     if (validity.isErr()) {
       switch (validity.unwrapErr()) {
         case ParseContext::ContinueStatementError::NotInALoop:
           this->error(JSMSG_BAD_CONTINUE);
           return cx_->alreadyReportedError();
         case ParseContext::ContinueStatementError::LabelNotFound:
           this->error(JSMSG_LABEL_NOT_FOUND);
           return cx_->alreadyReportedError();
@@ -820,17 +816,17 @@ DataProperty:
 
 Directive:
   build: |
     TokenPos pos = tokenizer_->pos(start);
     BINJS_TRY_DECL(result, factory_.newStringLiteral(rawValue, pos));
 
 DoWhileStatement:
   init:
-    ParseContext::Statement stmt(parseContext_, StatementKind::DoLoop);
+    ParseContext::Statement stmt(pc_, StatementKind::DoLoop);
   build: |
     BINJS_TRY_DECL(result,
                    factory_.newDoWhileStatement(body, test,
                                                 tokenizer_->pos(start)));
 
 EagerFunctionDeclaration:
   init: |
     const auto syntax = FunctionSyntaxKind::Statement;
@@ -855,17 +851,17 @@ FunctionExpressionContents:
       after: |
         // TODO: Use this in BinASTParser::buildFunction.
         (void) isThisCaptured;
     isFunctionNameCaptured:
       after: |
         // Per spec, isFunctionNameCaptured can be true for anonymous
         // function.  Check isFunctionNameCaptured only for named
         // function.
-        if (parseContext_->functionBox()->function()->isNamedLambda() &&
+        if (pc_->functionBox()->function()->isNamedLambda() &&
           isFunctionNameCaptured) {
           captureFunctionName();
         }
     parameterScope:
       before: |
         Rooted<GCVector<JSAtom*>> positionalParams(cx_, GCVector<JSAtom*>(cx_));
       extra-args: |
         &positionalParams
@@ -927,31 +923,30 @@ EagerFunctionExpression:
            syntax != FunctionSyntaxKind::Getter) ? name : nullptr));
 
         forceStrictIfNecessary(funbox, directives);
 
         // Push a new ParseContext. It will be used to parse `scope`, the arguments,
         // the function.
         BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
         BINJS_TRY(funpc.init());
-        parseContext_->functionScope().useAsVarScope(parseContext_);
-        MOZ_ASSERT(parseContext_->isFunctionBox());
+        pc_->functionScope().useAsVarScope(pc_);
+        MOZ_ASSERT(pc_->isFunctionBox());
 
-        ParseContext::Scope lexicalScope(cx_, parseContext_, usedNames_);
-        BINJS_TRY(lexicalScope.init(parseContext_));
+        ParseContext::Scope lexicalScope(cx_, pc_, usedNames_);
+        BINJS_TRY(lexicalScope.init(pc_));
         ListNode* params;
         ListNode* body;
       extra-args: |
         length, &params, &body
       after: |
         MOZ_TRY(prependDirectivesToBody(body, directives));
   build: |
     BINJS_TRY_DECL(lexicalScopeData,
-                   NewLexicalScopeData(cx_, lexicalScope, alloc_,
-                                       parseContext_));
+                   NewLexicalScopeData(cx_, lexicalScope, alloc_, pc_));
     BINJS_TRY_DECL(bodyScope,
                    factory_.newLexicalScope(*lexicalScopeData, body));
     BINJS_MOZ_TRY_DECL(result,
                        buildFunction(start, kind, name, params, bodyScope,
                                      funbox));
 
 LazyFunctionExpression:
   init: |
@@ -984,18 +979,18 @@ LazyFunctionExpression:
     RootedFunction fun(cx_, funbox->function());
 
     // TODO: This will become incorrect in the face of ES6 features.
     fun->setArgCount(length);
 
     auto skipStart = contentsSkip.startOffset();
     BINJS_TRY_DECL(lazy, LazyScript::Create(
       cx_, fun, sourceObject_,
-      parseContext_->closedOverBindingsForLazy(),
-      parseContext_->innerFunctionsForLazy,
+      pc_->closedOverBindingsForLazy(),
+      pc_->innerFunctionsForLazy,
       skipStart, skipStart + contentsSkip.length(),
       skipStart, 0, skipStart, ParseGoal::Script));
 
     if (funbox->strict()) {
       lazy->setStrict();
     }
     lazy->setIsBinAST();
     funbox->function()->initLazyScript(lazy);
@@ -1060,97 +1055,97 @@ ForInOfBinding:
     BINJS_TRY_DECL(result,
                    factory_.newDeclarationList(pnk, tokenizer_->pos(start)));
     factory_.addList(result, binding);
 
 
 
 ForInStatement:
   init: |
-    ParseContext::Statement stmt(parseContext_, StatementKind::ForInLoop);
+    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_, parseContext_, usedNames_);
-    BINJS_TRY(scope.init(parseContext_));
+    ParseContext::Scope scope(cx_, pc_, usedNames_);
+    BINJS_TRY(scope.init(pc_));
   build: |
     BINJS_TRY_DECL(forHead,
                    factory_.newForInOrOfHead(ParseNodeKind::ForIn, left, right,
                                              tokenizer_->pos(start)));
     ParseNode* result;
     BINJS_TRY_VAR(result,
                   factory_.newForStatement(start, forHead, body,
                                             /* iflags = */ 0));
 
     if (!scope.isEmpty()) {
-      BINJS_TRY_DECL(bindings, NewLexicalScopeData(cx_, scope, alloc_, parseContext_));
+      BINJS_TRY_DECL(bindings, NewLexicalScopeData(cx_, scope, alloc_, pc_));
       BINJS_TRY_VAR(result, factory_.newLexicalScope(*bindings, result));
     }
 
 FormalParameters:
   type-ok:
     ListNode*
   build: |
     auto result = items;
     if (rest) {
       return raiseError("Rest parameter is not supported in this preview release");
     }
 
 ForStatement:
   init: |
-    ParseContext::Statement stmt(parseContext_, StatementKind::ForLoop);
+    ParseContext::Statement stmt(pc_, StatementKind::ForLoop);
 
     // Implicit scope around the `for`, used to store `for (let x; ...; ...)`
     // or `for (const x; ...; ...)`-style declarations. Detail on the
     // declaration is stored as part of `BINJS_Scope`.
-    ParseContext::Scope scope(cx_, parseContext_, usedNames_);
-    BINJS_TRY(scope.init(parseContext_));
+    ParseContext::Scope scope(cx_, pc_, usedNames_);
+    BINJS_TRY(scope.init(pc_));
   build: |
     BINJS_TRY_DECL(forHead,
                    factory_.newForHead(init, test, update,
                                        tokenizer_->pos(start)));
     ParseNode* result;
     BINJS_TRY_VAR(result,
                   factory_.newForStatement(start, forHead, body,
                                            /* iflags = */ 0));
 
     if (!scope.isEmpty()) {
       BINJS_TRY_DECL(bindings,
-                     NewLexicalScopeData(cx_, scope, alloc_, parseContext_));
+                     NewLexicalScopeData(cx_, scope, alloc_, pc_));
       BINJS_TRY_VAR(result, factory_.newLexicalScope(*bindings, result));
     }
 
 FunctionBody:
   inherits: ListOfStatement
 
 IdentifierExpression:
   build: |
     if (!IsIdentifier(name)) {
       return raiseError("Invalid identifier");
     }
-    BINJS_TRY(usedNames_.noteUse(cx_, name, parseContext_->scriptId(),
-                                 parseContext_->innermostScope()->id()));
+    BINJS_TRY(usedNames_.noteUse(cx_, name, pc_->scriptId(),
+                                 pc_->innermostScope()->id()));
     BINJS_TRY_DECL(result,
                    factory_.newName(name->asPropertyName(),
                                     tokenizer_->pos(start), cx_));
 
 IfStatement:
   build: |
     BINJS_TRY_DECL(result,
                    factory_.newIfStatement(start, test, consequent, alternate));
 
 LabelledStatement:
   fields:
     label:
       after: |
         if (!IsIdentifier(label)) {
           return raiseError("Invalid identifier");
         }
-        ParseContext::LabelStatement stmt(parseContext_, label);
+        ParseContext::LabelStatement stmt(pc_, label);
   build: |
     BINJS_TRY_DECL(result,
                    factory_.newLabeledStatement(label->asPropertyName(), body,
                                                 start));
 
 ListOfAssertedBoundName:
   extra-params: AssertedScopeKind scopeKind
   extra-args: scopeKind
@@ -1339,44 +1334,44 @@ ObjectExpression:
 OptionalCatchClause:
   type-ok:
     LexicalScopeNode*
 
 Parameter:
   sum-arms:
     BindingIdentifier:
       after: |
-        if (!parseContext_->positionalFormalParameterNames().append(
+        if (!pc_->positionalFormalParameterNames().append(
                 result->template as<NameNode>().atom())) {
           return raiseOOM();
         }
-        if (parseContext_->isFunctionBox()) {
-          parseContext_->functionBox()->length++;
+        if (pc_->isFunctionBox()) {
+          pc_->functionBox()->length++;
         }
 
 ReturnStatement:
   init: |
-    if (!parseContext_->isFunctionBox()) {
+    if (!pc_->isFunctionBox()) {
       // Return statements are permitted only inside functions.
       return raiseInvalidKind("Toplevel Statement", kind);
     }
 
-    parseContext_->functionBox()->usesReturn = true;
+    pc_->functionBox()->usesReturn = true;
   build: |
     BINJS_TRY_DECL(result,
                    factory_.newReturnStatement(expression,
                                                tokenizer_->pos(start)));
 
 Script:
   fields:
     directives:
       after: |
-        forceStrictIfNecessary(parseContext_->sc(), directives);
+        forceStrictIfNecessary(pc_->sc(), directives);
   build: |
-    MOZ_TRY(checkClosedVars(parseContext_->varScope()));
+    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));
     BINJS_TRY_DECL(propName,
@@ -1396,28 +1391,28 @@ SwitchDefault:
   build: |
     BINJS_TRY_DECL(result,
                    factory_.newCaseOrDefault(start, nullptr, consequent));
 
 SwitchStatement:
   fields:
     discriminant:
       after: |
-        ParseContext::Statement stmt(parseContext_, StatementKind::Switch);
+        ParseContext::Statement stmt(pc_, StatementKind::Switch);
   build: |
     BINJS_TRY_DECL(scope, factory_.newLexicalScope(nullptr, cases));
     BINJS_TRY_DECL(result,
                    factory_.newSwitchStatement(start, discriminant, scope,
                                                /* hasDefault = */ false));
 
 SwitchStatementWithDefault:
   fields:
     discriminant:
       after: |
-        ParseContext::Statement stmt(parseContext_, StatementKind::Switch);
+        ParseContext::Statement stmt(pc_, StatementKind::Switch);
   build: |
     // Concatenate `preDefaultCase`, `defaultCase`, `postDefaultCase`
     auto cases = preDefaultCases;
     factory_.addList(cases, defaultCase);
     ParseNode* iter = postDefaultCases->head();
     while (iter) {
       ParseNode* next = iter->pn_next;
       factory_.addList(cases, iter);
@@ -1453,26 +1448,26 @@ StaticMemberExpression:
   build: |
     BINJS_TRY_DECL(name,
                    factory_.newPropertyName(property->asPropertyName(),
                    tokenizer_->pos(nameStart)));
     BINJS_TRY_DECL(result, factory_.newPropertyAccess(object, name));
 
 ThisExpression:
   build: |
-    if (parseContext_->isFunctionBox()) {
-      parseContext_->functionBox()->usesThis = true;
+    if (pc_->isFunctionBox()) {
+      pc_->functionBox()->usesThis = true;
     }
 
     TokenPos pos = tokenizer_->pos(start);
     ParseNode* thisName(nullptr);
-    if (parseContext_->sc()->thisBinding() == ThisBinding::Function) {
+    if (pc_->sc()->thisBinding() == ThisBinding::Function) {
       HandlePropertyName dotThis = cx_->names().dotThis;
-      BINJS_TRY(usedNames_.noteUse(cx_, dotThis, parseContext_->scriptId(),
-                                   parseContext_->innermostScope()->id()));
+      BINJS_TRY(usedNames_.noteUse(cx_, dotThis, pc_->scriptId(),
+                                   pc_->innermostScope()->id()));
       BINJS_TRY_VAR(thisName, factory_.newName(dotThis, pos, cx_));
     }
 
     BINJS_TRY_DECL(result, factory_.newThisLiteral(pos, thisName));
 
 ThrowStatement:
   build: |
     BINJS_TRY_DECL(result,
@@ -1481,42 +1476,42 @@ ThrowStatement:
 
 TryCatchStatement:
   fields:
     body:
       block:
         declare:
           ParseNode* body;
         before: |
-          ParseContext::Statement stmt(parseContext_, StatementKind::Try);
-          ParseContext::Scope scope(cx_, parseContext_, usedNames_);
-          BINJS_TRY(scope.init(parseContext_));
+          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,
                                             /* finallyBlock = */ nullptr));
 
 TryFinallyStatement:
   fields:
     body:
       block:
         declare:
           ParseNode* body;
         before: |
-          ParseContext::Statement stmt(parseContext_, StatementKind::Try);
-          ParseContext::Scope scope(cx_, parseContext_, usedNames_);
-          BINJS_TRY(scope.init(parseContext_));
+          ParseContext::Statement stmt(pc_, StatementKind::Try);
+          ParseContext::Scope scope(cx_, pc_, usedNames_);
+          BINJS_TRY(scope.init(pc_));
     finalizer:
       block:
         declare:
           ParseNode* finalizer;
         before: |
-          ParseContext::Statement stmt(parseContext_, StatementKind::Finally);
-          ParseContext::Scope scope(cx_, parseContext_, usedNames_);
-          BINJS_TRY(scope.init(parseContext_));
+          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,
                                             finalizer));
 
 UnaryExpression:
   build: |
     ParseNodeKind pnk;
@@ -1545,17 +1540,17 @@ UnaryExpression:
         pnk = ParseNodeKind::VoidExpr;
         break;
       case UnaryOperator::Delete: {
         switch (operand->getKind()) {
           case ParseNodeKind::Name:
             operand->setOp(JSOP_DELNAME);
             pnk = ParseNodeKind::DeleteNameExpr;
             BINJS_TRY(this->strictModeError(JSMSG_DEPRECATED_DELETE_OPERAND));
-            parseContext_->sc()->setBindingsAccessedDynamically();
+            pc_->sc()->setBindingsAccessedDynamically();
             break;
           case ParseNodeKind::DotExpr:
             pnk = ParseNodeKind::DeletePropExpr;
             break;
           case ParseNodeKind::ElemExpr:
             pnk = ParseNodeKind::DeleteElemExpr;
             break;
           default:
@@ -1633,20 +1628,20 @@ VariableDeclarator:
       MOZ_CRASH("Unimplemented: AssertedScope check for BindingPattern variable declaration");
       BINJS_TRY_VAR(result,
                     factory_.newAssignment(ParseNodeKind::AssignExpr, binding,
                                            init));
     }
 
 WhileStatement:
   init:
-    ParseContext::Statement stmt(parseContext_, StatementKind::WhileLoop);
+    ParseContext::Statement stmt(pc_, StatementKind::WhileLoop);
   build:
     BINJS_TRY_DECL(result, factory_.newWhileStatement(start, test, body));
 
 WithStatement:
   fields:
     body:
       before: |
-        ParseContext::Statement stmt(parseContext_, StatementKind::With);
+        ParseContext::Statement stmt(pc_, StatementKind::With);
   build: |
-    parseContext_->sc()->setBindingsAccessedDynamically();
+    pc_->sc()->setBindingsAccessedDynamically();
     BINJS_TRY_DECL(result, factory_.newWithStatement(start, object, body));