| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/flow_graph_builder.h" | 5 #include "vm/flow_graph_builder.h" |
| 6 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
| 9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
| 10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2108 AddInstruction( | 2108 AddInstruction( |
| 2109 new(I) CheckStackOverflowInstr(node->token_pos(), | 2109 new(I) CheckStackOverflowInstr(node->token_pos(), |
| 2110 owner()->loop_depth())); | 2110 owner()->loop_depth())); |
| 2111 } | 2111 } |
| 2112 | 2112 |
| 2113 if (node->condition() == NULL) { | 2113 if (node->condition() == NULL) { |
| 2114 // Endless loop, no test. | 2114 // Endless loop, no test. |
| 2115 Append(for_body); | 2115 Append(for_body); |
| 2116 exit_ = nested_loop.break_target(); // May be NULL. | 2116 exit_ = nested_loop.break_target(); // May be NULL. |
| 2117 } else { | 2117 } else { |
| 2118 EffectGraphVisitor for_test_preamble(owner()); |
| 2119 if (node->condition_preamble() != NULL) { |
| 2120 node->condition_preamble()->Visit(&for_test_preamble); |
| 2121 Append(for_test_preamble); |
| 2122 } |
| 2123 |
| 2118 TestGraphVisitor for_test(owner(), node->condition()->token_pos()); | 2124 TestGraphVisitor for_test(owner(), node->condition()->token_pos()); |
| 2119 node->condition()->Visit(&for_test); | 2125 node->condition()->Visit(&for_test); |
| 2120 Append(for_test); | 2126 Append(for_test); |
| 2121 | 2127 |
| 2122 BlockEntryInstr* body_entry = for_test.CreateTrueSuccessor(); | 2128 BlockEntryInstr* body_entry = for_test.CreateTrueSuccessor(); |
| 2123 AppendFragment(body_entry, for_body); | 2129 AppendFragment(body_entry, for_body); |
| 2124 | 2130 |
| 2125 if (nested_loop.break_target() == NULL) { | 2131 if (nested_loop.break_target() == NULL) { |
| 2126 exit_ = for_test.CreateFalseSuccessor(); | 2132 exit_ = for_test.CreateFalseSuccessor(); |
| 2127 } else { | 2133 } else { |
| (...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4201 Report::MessageF(Report::kBailout, | 4207 Report::MessageF(Report::kBailout, |
| 4202 Script::Handle(function.script()), | 4208 Script::Handle(function.script()), |
| 4203 function.token_pos(), | 4209 function.token_pos(), |
| 4204 "FlowGraphBuilder Bailout: %s %s", | 4210 "FlowGraphBuilder Bailout: %s %s", |
| 4205 String::Handle(function.name()).ToCString(), | 4211 String::Handle(function.name()).ToCString(), |
| 4206 reason); | 4212 reason); |
| 4207 UNREACHABLE(); | 4213 UNREACHABLE(); |
| 4208 } | 4214 } |
| 4209 | 4215 |
| 4210 } // namespace dart | 4216 } // namespace dart |
| OLD | NEW |