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

Unified Diff: src/compiler/ast-loop-assignment-analyzer.cc

Issue 2356733002: [turbofan] Fix loop assignment analysis on ForInStatements. (Closed)
Patch Set: 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 | test/mjsunit/regress/regress-crbug-647887.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-loop-assignment-analyzer.cc
diff --git a/src/compiler/ast-loop-assignment-analyzer.cc b/src/compiler/ast-loop-assignment-analyzer.cc
index b1b666a728a276ab1fbe37d62fdcfc59b333a15a..82eaeb28a46840d5087c1b0baf1ea754282641bb 100644
--- a/src/compiler/ast-loop-assignment-analyzer.cc
+++ b/src/compiler/ast-loop-assignment-analyzer.cc
@@ -252,10 +252,12 @@ void ALAA::VisitForStatement(ForStatement* loop) {
void ALAA::VisitForInStatement(ForInStatement* loop) {
+ Expression* l = loop->each();
Enter(loop);
- Visit(loop->each());
+ Visit(l);
Visit(loop->subject());
Visit(loop->body());
+ if (l->IsVariableProxy()) AnalyzeAssignment(l->AsVariableProxy()->var());
Exit(loop);
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-647887.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698