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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 988423003: [turbofan] Fix --turbo-osr for OSRing into inner loop inside for-in. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/compiler/osr-forin-nested.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 96809fc2dff053b92817c2ffd0bdf7ad66a819d5..5c874bc8b52cda3ada0456241050a20aadc50b75 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -1194,7 +1194,9 @@ void AstGraphBuilder::VisitForInBody(ForInStatement* stmt) {
// Bind value and do loop body.
VisitForInAssignment(stmt->each(), value, stmt->AssignmentId());
VisitIterationBody(stmt, &for_loop);
+ index = environment()->Peek(0);
for_loop.EndBody();
+
// Inc counter and continue.
Node* index_inc =
NewNode(javascript()->Add(), index, jsgraph()->OneConstant());
« no previous file with comments | « no previous file | test/mjsunit/compiler/osr-forin-nested.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698