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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 1949433002: [turbofan] Fix OSR environment in for-in. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/regress-607493.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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/ast-loop-assignment-analyzer.h" 9 #include "src/compiler/ast-loop-assignment-analyzer.h"
10 #include "src/compiler/control-builders.h" 10 #include "src/compiler/control-builders.h"
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 test_value.Else(); 1391 test_value.Else();
1392 { 1392 {
1393 // Bind value and do loop body. 1393 // Bind value and do loop body.
1394 VectorSlotPair feedback = 1394 VectorSlotPair feedback =
1395 CreateVectorSlotPair(stmt->EachFeedbackSlot()); 1395 CreateVectorSlotPair(stmt->EachFeedbackSlot());
1396 VisitForInAssignment(stmt->each(), value, feedback, stmt->FilterId(), 1396 VisitForInAssignment(stmt->each(), value, feedback, stmt->FilterId(),
1397 stmt->AssignmentId()); 1397 stmt->AssignmentId());
1398 VisitIterationBody(stmt, &for_loop); 1398 VisitIterationBody(stmt, &for_loop);
1399 } 1399 }
1400 test_value.End(); 1400 test_value.End();
1401 index = environment()->Peek(0);
1402 for_loop.EndBody(); 1401 for_loop.EndBody();
1403 1402
1404 // Increment counter and continue. 1403 // Increment counter and continue.
1404 index = environment()->Peek(0);
1405 index = NewNode(javascript()->ForInStep(), index); 1405 index = NewNode(javascript()->ForInStep(), index);
1406 environment()->Poke(0, index); 1406 environment()->Poke(0, index);
1407 } 1407 }
1408 for_loop.EndLoop(); 1408 for_loop.EndLoop();
1409 environment()->Drop(5); 1409 environment()->Drop(5);
1410 } 1410 }
1411 for_block.EndBlock(); 1411 for_block.EndBlock();
1412 } 1412 }
1413 1413
1414 1414
(...skipping 2920 matching lines...) Expand 10 before | Expand all | Expand 10 after
4335 // Phi does not exist yet, introduce one. 4335 // Phi does not exist yet, introduce one.
4336 value = NewPhi(inputs, value, control); 4336 value = NewPhi(inputs, value, control);
4337 value->ReplaceInput(inputs - 1, other); 4337 value->ReplaceInput(inputs - 1, other);
4338 } 4338 }
4339 return value; 4339 return value;
4340 } 4340 }
4341 4341
4342 } // namespace compiler 4342 } // namespace compiler
4343 } // namespace internal 4343 } // namespace internal
4344 } // namespace v8 4344 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-607493.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698