Index: src/parsing/parser.h |
diff --git a/src/parsing/parser.h b/src/parsing/parser.h |
index ac70ca8461c70aed1ab5d6602c8544e744c89bb4..bbc170462fc6910bdf2cb250995519383b5aa434 100644 |
--- a/src/parsing/parser.h |
+++ b/src/parsing/parser.h |
@@ -266,11 +266,6 @@ class Parser : public ParserBase<Parser> { |
}; |
ZoneList<const NamedImport*>* ParseNamedImports(int pos, bool* ok); |
Statement* ParseFunctionDeclaration(bool* ok); |
- Statement* ParseHoistableDeclaration(ZoneList<const AstRawString*>* names, |
- bool default_export, bool* ok); |
- Statement* ParseHoistableDeclaration(int pos, ParseFunctionFlags flags, |
- ZoneList<const AstRawString*>* names, |
- bool default_export, bool* ok); |
Statement* ParseAsyncFunctionDeclaration(ZoneList<const AstRawString*>* names, |
bool default_export, bool* ok); |
Expression* ParseAsyncFunctionExpression(bool* ok); |
@@ -286,6 +281,11 @@ class Parser : public ParserBase<Parser> { |
const DeclarationParsingResult::Declaration* declaration, |
ZoneList<const AstRawString*>* names, bool* ok); |
+ Statement* DeclareFunction(const AstRawString* variable_name, |
+ FunctionLiteral* function, int pos, |
+ bool is_generator, bool is_async, |
+ ZoneList<const AstRawString*>* names, bool* ok); |
+ |
Block* ParseVariableStatement(VariableDeclarationContext var_context, |
ZoneList<const AstRawString*>* names, |
bool* ok); |
@@ -716,6 +716,13 @@ class Parser : public ParserBase<Parser> { |
return property->value(); |
} |
+ V8_INLINE void GetDefaultStrings( |
+ const AstRawString** default_string, |
+ const AstRawString** star_default_star_string) { |
+ *default_string = ast_value_factory()->default_string(); |
+ *star_default_star_string = ast_value_factory()->star_default_star_string(); |
+ } |
+ |
// Functions for encapsulating the differences between parsing and preparsing; |
// operations interleaved with the recursive descent. |
V8_INLINE void PushLiteralName(const AstRawString* id) { |
@@ -737,6 +744,11 @@ class Parser : public ParserBase<Parser> { |
} |
} |
+ V8_INLINE void PushEnclosingName(const AstRawString* name) { |
+ DCHECK_NOT_NULL(fni_); |
+ fni_->PushEnclosingName(name); |
+ } |
+ |
V8_INLINE void InferFunctionName(FunctionLiteral* func_to_infer) { |
fni_->AddFunction(func_to_infer); |
} |
@@ -846,6 +858,9 @@ class Parser : public ParserBase<Parser> { |
return nullptr; |
} |
V8_INLINE static FunctionLiteral* EmptyFunctionLiteral() { return nullptr; } |
+ // Using GetEmptyStatement instead of EmptyStatement because EmptyStatement is |
+ // already in use. |
+ V8_INLINE static Statement* GetEmptyStatement() { return nullptr; } |
nickie
2016/09/06 17:29:57
There's a NullStatement on line 881. I suppose th
marja
2016/09/08 11:15:58
Ah true; confused about Null / Empty!
|
V8_INLINE static Block* NullBlock() { return nullptr; } |
V8_INLINE static bool IsEmptyExpression(Expression* expr) { |