OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |