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

Unified Diff: src/parsing/preparser.cc

Issue 2679263002: Revert of [parsing] Fix maybe-assigned for loop variables. (Closed)
Patch Set: Created 3 years, 10 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/pattern-rewriter.cc ('k') | test/cctest/parsing/test-preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.cc
diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
index 43877b030c764c09332f6fad89e3f1b4d806c609..0377a1b9d35e70ff9cb131ad061e01f7f257888f 100644
--- a/src/parsing/preparser.cc
+++ b/src/parsing/preparser.cc
@@ -310,14 +310,8 @@
DCHECK(track_unresolved_variables_);
for (auto variable : *(declaration->pattern.variables_)) {
declaration_descriptor->scope->RemoveUnresolved(variable);
- Variable* var = scope()->DeclareVariableName(
- variable->raw_name(), declaration_descriptor->mode);
- if (FLAG_preparser_scope_analysis) {
- MarkLoopVariableAsAssigned(declaration_descriptor->scope, var);
- // This is only necessary if there is an initializer, but we don't have
- // that information here. Consequently, the preparser sometimes says
- // maybe-assigned where the parser (correctly) says never-assigned.
- }
+ scope()->DeclareVariableName(variable->raw_name(),
+ declaration_descriptor->mode);
if (names) {
names->Add(variable->raw_name(), zone());
}
« no previous file with comments | « src/parsing/pattern-rewriter.cc ('k') | test/cctest/parsing/test-preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698