| 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 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // Unbox doubles. | 202 // Unbox doubles. |
| 203 flow_graph->ComputeUseLists(); | 203 flow_graph->ComputeUseLists(); |
| 204 optimizer.SelectRepresentations(); | 204 optimizer.SelectRepresentations(); |
| 205 | 205 |
| 206 if (FLAG_constant_propagation || | 206 if (FLAG_constant_propagation || |
| 207 FLAG_common_subexpression_elimination) { | 207 FLAG_common_subexpression_elimination) { |
| 208 flow_graph->ComputeUseLists(); | 208 flow_graph->ComputeUseLists(); |
| 209 } | 209 } |
| 210 if (FLAG_constant_propagation) { | 210 if (FLAG_constant_propagation) { |
| 211 ConstantPropagator::Optimize(flow_graph); | 211 ConstantPropagator::Optimize(flow_graph); |
| 212 // A canonicalization pass to remove e.g. smi checks on smi constants. |
| 213 optimizer.OptimizeComputations(); |
| 212 } | 214 } |
| 213 if (FLAG_common_subexpression_elimination) { | 215 if (FLAG_common_subexpression_elimination) { |
| 214 DominatorBasedCSE::Optimize(flow_graph); | 216 DominatorBasedCSE::Optimize(flow_graph); |
| 215 } | 217 } |
| 216 if (FLAG_loop_invariant_code_motion && | 218 if (FLAG_loop_invariant_code_motion && |
| 217 (parsed_function.function().deoptimization_counter() < | 219 (parsed_function.function().deoptimization_counter() < |
| 218 (FLAG_deoptimization_counter_threshold - 1))) { | 220 (FLAG_deoptimization_counter_threshold - 1))) { |
| 219 LICM::Optimize(flow_graph); | 221 LICM::Optimize(flow_graph); |
| 220 } | 222 } |
| 221 | 223 |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 result = isolate->object_store()->sticky_error(); | 586 result = isolate->object_store()->sticky_error(); |
| 585 isolate->object_store()->clear_sticky_error(); | 587 isolate->object_store()->clear_sticky_error(); |
| 586 isolate->set_long_jump_base(base); | 588 isolate->set_long_jump_base(base); |
| 587 return result.raw(); | 589 return result.raw(); |
| 588 } | 590 } |
| 589 UNREACHABLE(); | 591 UNREACHABLE(); |
| 590 return Object::null(); | 592 return Object::null(); |
| 591 } | 593 } |
| 592 | 594 |
| 593 } // namespace dart | 595 } // namespace dart |
| OLD | NEW |