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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/compiler/osr-forin-nested.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/ast-loop-assignment-analyzer.h" 8 #include "src/compiler/ast-loop-assignment-analyzer.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 } 1187 }
1188 // Replace 'value' in environment. 1188 // Replace 'value' in environment.
1189 environment()->Push(res); 1189 environment()->Push(res);
1190 test_should_filter.Else(); 1190 test_should_filter.Else();
1191 test_should_filter.End(); 1191 test_should_filter.End();
1192 } 1192 }
1193 value = environment()->Pop(); 1193 value = environment()->Pop();
1194 // Bind value and do loop body. 1194 // Bind value and do loop body.
1195 VisitForInAssignment(stmt->each(), value, stmt->AssignmentId()); 1195 VisitForInAssignment(stmt->each(), value, stmt->AssignmentId());
1196 VisitIterationBody(stmt, &for_loop); 1196 VisitIterationBody(stmt, &for_loop);
1197 index = environment()->Peek(0);
1197 for_loop.EndBody(); 1198 for_loop.EndBody();
1199
1198 // Inc counter and continue. 1200 // Inc counter and continue.
1199 Node* index_inc = 1201 Node* index_inc =
1200 NewNode(javascript()->Add(), index, jsgraph()->OneConstant()); 1202 NewNode(javascript()->Add(), index, jsgraph()->OneConstant());
1201 // TODO(jarin): provide real bailout id. 1203 // TODO(jarin): provide real bailout id.
1202 PrepareFrameStateAfterAndBefore(index_inc, BailoutId::None(), 1204 PrepareFrameStateAfterAndBefore(index_inc, BailoutId::None(),
1203 OutputFrameStateCombine::Ignore(), 1205 OutputFrameStateCombine::Ignore(),
1204 jsgraph()->EmptyFrameState()); 1206 jsgraph()->EmptyFrameState());
1205 environment()->Poke(0, index_inc); 1207 environment()->Poke(0, index_inc);
1206 for_loop.EndLoop(); 1208 for_loop.EndLoop();
1207 environment()->Drop(5); 1209 environment()->Drop(5);
(...skipping 2092 matching lines...) Expand 10 before | Expand all | Expand 10 after
3300 // Phi does not exist yet, introduce one. 3302 // Phi does not exist yet, introduce one.
3301 value = NewPhi(inputs, value, control); 3303 value = NewPhi(inputs, value, control);
3302 value->ReplaceInput(inputs - 1, other); 3304 value->ReplaceInput(inputs - 1, other);
3303 } 3305 }
3304 return value; 3306 return value;
3305 } 3307 }
3306 3308
3307 } // namespace compiler 3309 } // namespace compiler
3308 } // namespace internal 3310 } // namespace internal
3309 } // namespace v8 3311 } // namespace v8
OLDNEW
« 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