summaryrefslogtreecommitdiff
path: root/js/src/frontend/Parser.h
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-07-14 13:05:27 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:45 -0400
commit55c897db3c504c10650b94d97bb13ed79b0e23c6 (patch)
tree1e4ffdece9c16f0007bbc7d8929b414e85d14c54 /js/src/frontend/Parser.h
parentb02f52f8a7cfedb92b1f6cf9a09c0a220b68b2f4 (diff)
downloaduxp-55c897db3c504c10650b94d97bb13ed79b0e23c6.tar.gz
1303703 - Part 2: Clean-up bits of destructuring parsing which are no longer needed.
Diffstat (limited to 'js/src/frontend/Parser.h')
-rw-r--r--js/src/frontend/Parser.h19
1 files changed, 5 insertions, 14 deletions
diff --git a/js/src/frontend/Parser.h b/js/src/frontend/Parser.h
index 9b6387c9f8..8bd691fc4f 100644
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -340,17 +340,6 @@ class ParseContext : public Nestable<ParseContext>
// pointer may be nullptr.
Directives* newDirectives;
- // Set when parsing a declaration-like destructuring pattern. This flag
- // causes PrimaryExpr to create PN_NAME parse nodes for variable references
- // which are not hooked into any definition's use chain, added to any tree
- // context's AtomList, etc. etc. checkDestructuring will do that work
- // later.
- //
- // The comments atop checkDestructuring explain the distinction between
- // assignment-like and declaration-like destructuring patterns, and why
- // they need to be treated differently.
- mozilla::Maybe<DeclarationKind> inDestructuringDecl;
-
// Set when parsing a function and it has 'return <expr>;'
bool funHasReturnExpr;
@@ -1490,15 +1479,17 @@ class Parser final : public ParserBase, private JS::AutoGCRooter
mozilla::Maybe<LexicalScope::Data*> newLexicalScopeData(ParseContext::Scope& scope);
Node finishLexicalScope(ParseContext::Scope& scope, Node body);
- Node propertyName(YieldHandling yieldHandling, Node propList,
+ Node propertyName(YieldHandling yieldHandling,
+ const mozilla::Maybe<DeclarationKind>& maybeDecl, Node propList,
PropertyType* propType, MutableHandleAtom propAtom);
- Node computedPropertyName(YieldHandling yieldHandling, Node literal);
+ Node computedPropertyName(YieldHandling yieldHandling,
+ const mozilla::Maybe<DeclarationKind>& maybeDecl, Node literal);
Node arrayInitializer(YieldHandling yieldHandling, PossibleError* possibleError);
Node newRegExp();
Node objectLiteral(YieldHandling yieldHandling, PossibleError* possibleError);
- Node bindingInitializer(Node lhs, YieldHandling yieldHandling);
+ Node bindingInitializer(Node lhs, DeclarationKind kind, YieldHandling yieldHandling);
Node bindingIdentifier(DeclarationKind kind, YieldHandling yieldHandling);
Node bindingIdentifierOrPattern(DeclarationKind kind, YieldHandling yieldHandling,
TokenKind tt);