summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/Parser.h
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-16 11:35:57 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-16 11:35:57 +0100
commitaf300f36f11293c12f2ee01580fc749a7e114376 (patch)
tree71e6a6286a95069a805a254eb7abed9f7a83f0d4 /js/src/frontend/Parser.h
parent28d4e4a5fa5ba7a22d3497769fbb5a9d11db7a9e (diff)
downloadUXP-af300f36f11293c12f2ee01580fc749a7e114376.tar
UXP-af300f36f11293c12f2ee01580fc749a7e114376.tar.gz
UXP-af300f36f11293c12f2ee01580fc749a7e114376.tar.lz
UXP-af300f36f11293c12f2ee01580fc749a7e114376.tar.xz
UXP-af300f36f11293c12f2ee01580fc749a7e114376.zip
Bug 755821: Function() should use the parser's argument parsing code
Diffstat (limited to 'js/src/frontend/Parser.h')
-rw-r--r--js/src/frontend/Parser.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/js/src/frontend/Parser.h b/js/src/frontend/Parser.h
index 0ad4d56a0..b58b021cd 100644
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -1020,12 +1020,12 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter
// Parse a module.
Node moduleBody(ModuleSharedContext* modulesc);
- // Parse a function, given only its body. Used for the Function and
- // Generator constructors.
- Node standaloneFunctionBody(HandleFunction fun, HandleScope enclosingScope,
- Handle<PropertyNameVector> formals,
- GeneratorKind generatorKind, FunctionAsyncKind asyncKind,
- Directives inheritedDirectives, Directives* newDirectives);
+ // Parse a function, used for the Function, GeneratorFunction, and
+ // AsyncFunction constructors.
+ Node standaloneFunction(HandleFunction fun, HandleScope enclosingScope,
+ mozilla::Maybe<uint32_t> parameterListEnd,
+ GeneratorKind generatorKind, FunctionAsyncKind asyncKind,
+ Directives inheritedDirectives, Directives* newDirectives);
// Parse a function, given only its arguments and body. Used for lazily
// parsed functions.
@@ -1041,7 +1041,9 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter
// Parse a function's formal parameters and its body assuming its function
// ParseContext is already on the stack.
bool functionFormalParametersAndBody(InHandling inHandling, YieldHandling yieldHandling,
- Node pn, FunctionSyntaxKind kind);
+ Node pn, FunctionSyntaxKind kind,
+ mozilla::Maybe<uint32_t> parameterListEnd = mozilla::Nothing());
+
// Determine whether |yield| is a valid name in the current context, or
// whether it's prohibited due to strictness, JS version, or occurrence