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

Unified Diff: src/parsing/parser.cc

Issue 2488493003: [inspector] fix positions for single expression arrow function (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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 | « src/interpreter/bytecode-array-builder.cc ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 92822d477aacff987d06f3f74fd987e57232f069..608b371e9505482efde46d7d49d156a1bbf534c7 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -285,7 +285,8 @@ FunctionLiteral* Parser::DefaultConstructor(const AstRawString* name,
name, function_scope, body, materialized_literal_count,
expected_property_count, parameter_count, parameter_count,
FunctionLiteral::kNoDuplicateParameters,
- FunctionLiteral::kAnonymousExpression, default_eager_compile_hint(), pos);
+ FunctionLiteral::kAnonymousExpression, default_eager_compile_hint(), pos,
+ true);
function_literal->set_requires_class_field_init(requires_class_field_init);
@@ -2722,7 +2723,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
FunctionLiteral* function_literal = factory()->NewFunctionLiteral(
function_name, scope, body, materialized_literal_count,
expected_property_count, num_parameters, function_length,
- duplicate_parameters, function_type, eager_compile_hint, pos);
+ duplicate_parameters, function_type, eager_compile_hint, pos, true);
function_literal->set_function_token_position(function_token_pos);
if (should_be_used_once_hint)
function_literal->set_should_be_used_once_hint();
@@ -3416,7 +3417,8 @@ FunctionLiteral* Parser::SynthesizeClassFieldInitializer(int count) {
initializer_state.expected_property_count(), 0, count,
FunctionLiteral::kNoDuplicateParameters,
FunctionLiteral::kAnonymousExpression,
- FunctionLiteral::kShouldLazyCompile, initializer_scope->start_position());
+ FunctionLiteral::kShouldLazyCompile, initializer_scope->start_position(),
+ true);
function_literal->set_is_class_field_initializer(true);
return function_literal;
}
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698