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/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/compiler/control-builders.h" | 8 #include "src/compiler/control-builders.h" |
9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 } | 737 } |
738 // Replace 'value' in environment. | 738 // Replace 'value' in environment. |
739 environment()->Push(res); | 739 environment()->Push(res); |
740 test_should_filter.Else(); | 740 test_should_filter.Else(); |
741 test_should_filter.End(); | 741 test_should_filter.End(); |
742 } | 742 } |
743 value = environment()->Pop(); | 743 value = environment()->Pop(); |
744 // Bind value and do loop body. | 744 // Bind value and do loop body. |
745 VisitForInAssignment(stmt->each(), value); | 745 VisitForInAssignment(stmt->each(), value); |
746 VisitIterationBody(stmt, &for_loop, 5); | 746 VisitIterationBody(stmt, &for_loop, 5); |
| 747 for_loop.EndBody(); |
747 // Inc counter and continue. | 748 // Inc counter and continue. |
748 Node* index_inc = | 749 Node* index_inc = |
749 NewNode(javascript()->Add(), index, jsgraph()->OneConstant()); | 750 NewNode(javascript()->Add(), index, jsgraph()->OneConstant()); |
750 // TODO(jarin): provide real bailout id. | 751 // TODO(jarin): provide real bailout id. |
751 PrepareFrameState(index_inc, BailoutId::None()); | 752 PrepareFrameState(index_inc, BailoutId::None()); |
752 environment()->Poke(0, index_inc); | 753 environment()->Poke(0, index_inc); |
753 for_loop.EndBody(); | |
754 for_loop.EndLoop(); | 754 for_loop.EndLoop(); |
755 environment()->Drop(5); | 755 environment()->Drop(5); |
756 // PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS); | 756 // PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS); |
757 } | 757 } |
758 have_no_properties.End(); | 758 have_no_properties.End(); |
759 } | 759 } |
760 is_null.End(); | 760 is_null.End(); |
761 } | 761 } |
762 is_undefined.End(); | 762 is_undefined.End(); |
763 } | 763 } |
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2031 | 2031 |
2032 // Continue with the original environment. | 2032 // Continue with the original environment. |
2033 set_environment(continuation_env); | 2033 set_environment(continuation_env); |
2034 NewNode(common()->Continuation()); | 2034 NewNode(common()->Continuation()); |
2035 } | 2035 } |
2036 } | 2036 } |
2037 | 2037 |
2038 } | 2038 } |
2039 } | 2039 } |
2040 } // namespace v8::internal::compiler | 2040 } // namespace v8::internal::compiler |
OLD | NEW |