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

Unified Diff: src/preparser.h

Issue 1260053004: Create function name const assignment after parsing language mode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: replace 0 by constant Created 5 years, 5 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
« src/parser.cc ('K') | « src/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 18a0162913d1774a8c1d3077c1e073f7a0a3762b..a3ae91c60281e4df0950049aa0170c10a717a6e4 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -1601,8 +1601,8 @@ class PreParserTraits {
V8_INLINE PreParserStatementList ParseEagerFunctionBody(
PreParserIdentifier function_name, int pos,
- const PreParserFormalParameters& parameters,
- Variable* fvar, Token::Value fvar_init_op, FunctionKind kind, bool* ok);
+ const PreParserFormalParameters& parameters, FunctionKind kind,
+ FunctionLiteral::FunctionType function_type, bool* ok);
V8_INLINE void ParseArrowFunctionFormalParameters(
PreParserFormalParameters* parameters,
@@ -1786,11 +1786,10 @@ class PreParser : public ParserBase<PreParserTraits> {
V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count,
int* expected_property_count, bool* ok);
- V8_INLINE PreParserStatementList
- ParseEagerFunctionBody(PreParserIdentifier function_name, int pos,
- const PreParserFormalParameters& parameters,
- Variable* fvar, Token::Value fvar_init_op,
- FunctionKind kind, bool* ok);
+ V8_INLINE PreParserStatementList ParseEagerFunctionBody(
+ PreParserIdentifier function_name, int pos,
+ const PreParserFormalParameters& parameters, FunctionKind kind,
+ FunctionLiteral::FunctionType function_type, bool* ok);
Expression ParseFunctionLiteral(
Identifier name, Scanner::Location function_name_location,
@@ -1845,8 +1844,8 @@ void PreParserTraits::ParseArrowFunctionFormalParameters(
PreParserStatementList PreParser::ParseEagerFunctionBody(
PreParserIdentifier function_name, int pos,
- const PreParserFormalParameters& parameters,
- Variable* fvar, Token::Value fvar_init_op, FunctionKind kind, bool* ok) {
+ const PreParserFormalParameters& parameters, FunctionKind kind,
+ FunctionLiteral::FunctionType function_type, bool* ok) {
ParsingModeScope parsing_mode(this, PARSE_EAGERLY);
ParseStatementList(Token::RBRACE, ok);
@@ -1859,10 +1858,10 @@ PreParserStatementList PreParser::ParseEagerFunctionBody(
PreParserStatementList PreParserTraits::ParseEagerFunctionBody(
PreParserIdentifier function_name, int pos,
- const PreParserFormalParameters& parameters,
- Variable* fvar, Token::Value fvar_init_op, FunctionKind kind, bool* ok) {
- return pre_parser_->ParseEagerFunctionBody(
- function_name, pos, parameters, fvar, fvar_init_op, kind, ok);
+ const PreParserFormalParameters& parameters, FunctionKind kind,
+ FunctionLiteral::FunctionType function_type, bool* ok) {
+ return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
+ kind, function_type, ok);
}
@@ -3768,7 +3767,7 @@ ParserBase<Traits>::ParseArrowFunctionLiteral(
} else {
body = this->ParseEagerFunctionBody(
this->EmptyIdentifier(), RelocInfo::kNoPosition, formal_parameters,
- NULL, Token::INIT_VAR, kArrowFunction, CHECK_OK);
+ kArrowFunction, FunctionLiteral::ANONYMOUS_EXPRESSION, CHECK_OK);
materialized_literal_count =
function_state.materialized_literal_count();
expected_property_count = function_state.expected_property_count();
« src/parser.cc ('K') | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698