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

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

Issue 2354333006: Merged: [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 334c5978a86f4088f80cb6af17d9b828980fae21..97da140b81ce0c3001f0aad99989acc116b4c027 100644
--- a/src/compiler/ast-loop-assignment-analyzer.cc
+++ b/src/compiler/ast-loop-assignment-analyzer.cc
@@ -254,10 +254,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