Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Unified Diff: src/parsing/parser.h

Issue 2311903003: Move ParseHoistableDeclaration to ParserBase. (Closed)
Patch Set: rebased Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | src/parsing/preparser.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | src/parsing/preparser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698