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/compiler.h" | 5 #include "vm/compiler.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 | 8 |
9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
10 #include "vm/code_generator.h" | 10 #include "vm/code_generator.h" |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 optimizer.ApplyClassIds(); | 208 optimizer.ApplyClassIds(); |
209 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 209 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
210 | 210 |
211 // Do optimizations that depend on the propagated type information. | 211 // Do optimizations that depend on the propagated type information. |
212 optimizer.Canonicalize(); | 212 optimizer.Canonicalize(); |
213 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 213 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
214 | 214 |
215 BranchSimplifier::Simplify(flow_graph); | 215 BranchSimplifier::Simplify(flow_graph); |
216 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 216 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
217 | 217 |
| 218 IfConverter::Simplify(flow_graph); |
| 219 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 220 |
218 if (FLAG_constant_propagation) { | 221 if (FLAG_constant_propagation) { |
219 ConstantPropagator::Optimize(flow_graph); | 222 ConstantPropagator::Optimize(flow_graph); |
220 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 223 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
221 // A canonicalization pass to remove e.g. smi checks on smi constants. | 224 // A canonicalization pass to remove e.g. smi checks on smi constants. |
222 optimizer.Canonicalize(); | 225 optimizer.Canonicalize(); |
223 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 226 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
224 } | 227 } |
225 | 228 |
226 // Propagate types and eliminate even more type tests. | 229 // Propagate types and eliminate even more type tests. |
227 if (FLAG_propagate_types) { | 230 if (FLAG_propagate_types) { |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 Object::Handle(isolate->object_store()->sticky_error()); | 690 Object::Handle(isolate->object_store()->sticky_error()); |
688 isolate->object_store()->clear_sticky_error(); | 691 isolate->object_store()->clear_sticky_error(); |
689 isolate->set_long_jump_base(base); | 692 isolate->set_long_jump_base(base); |
690 return result.raw(); | 693 return result.raw(); |
691 } | 694 } |
692 UNREACHABLE(); | 695 UNREACHABLE(); |
693 return Object::null(); | 696 return Object::null(); |
694 } | 697 } |
695 | 698 |
696 } // namespace dart | 699 } // namespace dart |
OLD | NEW |