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

Unified Diff: src/parsing/parser-base.h

Issue 2893313002: [inspector] removed call break location from for-of loop (Closed)
Patch Set: removed each_keyword_pos Created 3 years, 7 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 | « src/parsing/parser.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index a85d4f2e6a12622c0b6f05fe792242f33d0c975c..3e160948e852460d642c8f8ab784b6a2accca13d 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -5635,8 +5635,6 @@ ParserBase<Impl>::ParseForEachStatementWithDeclarations(
auto loop = factory()->NewForEachStatement(for_info->mode, labels, stmt_pos);
typename Types::Target target(this, loop);
- int each_keyword_pos = scanner()->location().beg_pos;
-
ExpressionT enumerable = impl()->EmptyExpression();
if (for_info->mode == ForEachStatement::ITERATE) {
ExpressionClassifier classifier(this);
@@ -5662,8 +5660,8 @@ ParserBase<Impl>::ParseForEachStatementWithDeclarations(
impl()->DesugarBindingInForEachStatement(for_info, &body_block,
&each_variable, CHECK_OK);
body_block->statements()->Add(body, zone());
- final_loop = impl()->InitializeForEachStatement(
- loop, each_variable, enumerable, body_block, each_keyword_pos);
+ final_loop = impl()->InitializeForEachStatement(loop, each_variable,
jgruber 2017/05/23 12:33:57 I'm trying to understand the logic change this CL
+ enumerable, body_block);
scope()->set_end_position(scanner()->location().end_pos);
body_block->set_scope(scope()->FinalizeBlockScope());
@@ -5700,8 +5698,6 @@ ParserBase<Impl>::ParseForEachStatementWithoutDeclarations(
auto loop = factory()->NewForEachStatement(for_info->mode, labels, stmt_pos);
typename Types::Target target(this, loop);
- int each_keyword_pos = scanner()->location().beg_pos;
-
ExpressionT enumerable = impl()->EmptyExpression();
if (for_info->mode == ForEachStatement::ITERATE) {
ExpressionClassifier classifier(this);
@@ -5722,8 +5718,8 @@ ParserBase<Impl>::ParseForEachStatementWithoutDeclarations(
StatementT body = ParseStatement(nullptr, CHECK_OK);
scope()->set_end_position(scanner()->location().end_pos);
- StatementT final_loop = impl()->InitializeForEachStatement(
- loop, expression, enumerable, body, each_keyword_pos);
+ StatementT final_loop =
+ impl()->InitializeForEachStatement(loop, expression, enumerable, body);
jgruber 2017/05/23 12:33:57 While here it all depends on whether expression's
kozy 2017/05/23 12:56:28 It's not just refactoring, location for for..of lo
for_scope = for_scope->FinalizeBlockScope();
USE(for_scope);
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698