| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library dart2js.cps_ir.optimizers; | 5 library dart2js.cps_ir.optimizers; |
| 6 | 6 |
| 7 import '../common/names.dart'; |
| 8 import '../constants/values.dart'; |
| 9 import '../universe/selector.dart'; |
| 7 import 'cps_ir_nodes.dart'; | 10 import 'cps_ir_nodes.dart'; |
| 8 import '../constants/values.dart'; | |
| 9 import '../common/names.dart'; | |
| 10 import '../universe/selector.dart'; | |
| 11 | 11 |
| 12 export 'type_propagation.dart' show TypePropagator; | 12 export 'backward_null_check_remover.dart' show BackwardNullCheckRemover; |
| 13 export 'scalar_replacement.dart' show ScalarReplacer; | |
| 14 export 'redundant_phi.dart' show RedundantPhiEliminator; | |
| 15 export 'redundant_join.dart' show RedundantJoinEliminator; | |
| 16 export 'shrinking_reductions.dart' show ShrinkingReducer; | |
| 17 export 'mutable_ssa.dart' show MutableVariableEliminator; | |
| 18 export 'insert_refinements.dart' show InsertRefinements; | |
| 19 export 'update_refinements.dart' show UpdateRefinements; | |
| 20 export 'redundant_refinement.dart' show RedundantRefinementEliminator; | |
| 21 export 'optimize_interceptors.dart' show OptimizeInterceptors; | |
| 22 export 'bounds_checker.dart' show BoundsChecker; | 13 export 'bounds_checker.dart' show BoundsChecker; |
| 23 export 'backward_null_check_remover.dart' show BackwardNullCheckRemover; | 14 export 'eagerly_load_statics.dart' show EagerlyLoadStatics; |
| 24 export 'gvn.dart' show GVN; | 15 export 'gvn.dart' show GVN; |
| 25 export 'inline.dart' show Inliner; | 16 export 'inline.dart' show Inliner; |
| 26 export 'eagerly_load_statics.dart' show EagerlyLoadStatics; | 17 export 'insert_refinements.dart' show InsertRefinements; |
| 27 export 'loop_invariant_branch.dart' show LoopInvariantBranchMotion; | 18 export 'loop_invariant_branch.dart' show LoopInvariantBranchMotion; |
| 19 export 'mutable_ssa.dart' show MutableVariableEliminator; |
| 20 export 'optimize_interceptors.dart' show OptimizeInterceptors; |
| 21 export 'parent_visitor.dart' show ParentVisitor; |
| 28 export 'path_based_optimizer.dart' show PathBasedOptimizer; | 22 export 'path_based_optimizer.dart' show PathBasedOptimizer; |
| 23 export 'redundant_join.dart' show RedundantJoinEliminator; |
| 24 export 'redundant_phi.dart' show RedundantPhiEliminator; |
| 25 export 'redundant_refinement.dart' show RedundantRefinementEliminator; |
| 26 export 'scalar_replacement.dart' show ScalarReplacer; |
| 27 export 'shrinking_reductions.dart' show ShrinkingReducer; |
| 28 export 'type_propagation.dart' show TypePropagator; |
| 29 export 'update_refinements.dart' show UpdateRefinements; |
| 29 export 'use_field_initializers.dart' show UseFieldInitializers; | 30 export 'use_field_initializers.dart' show UseFieldInitializers; |
| 30 export 'parent_visitor.dart' show ParentVisitor; | |
| 31 | 31 |
| 32 /// An optimization pass over the CPS IR. | 32 /// An optimization pass over the CPS IR. |
| 33 abstract class Pass { | 33 abstract class Pass { |
| 34 /// Applies optimizations to root, rewriting it in the process. | 34 /// Applies optimizations to root, rewriting it in the process. |
| 35 void rewrite(FunctionDefinition root); | 35 void rewrite(FunctionDefinition root); |
| 36 | 36 |
| 37 String get passName; | 37 String get passName; |
| 38 } | 38 } |
| 39 | 39 |
| 40 // Shared code between optimizations | 40 // Shared code between optimizations |
| (...skipping 18 matching lines...) Expand all Loading... |
| 59 | 59 |
| 60 /// Selectors that do not throw when invoked on the null value. | 60 /// Selectors that do not throw when invoked on the null value. |
| 61 final List<Selector> selectorsOnNull = <Selector>[ | 61 final List<Selector> selectorsOnNull = <Selector>[ |
| 62 Selectors.equals, | 62 Selectors.equals, |
| 63 Selectors.hashCode_, | 63 Selectors.hashCode_, |
| 64 Selectors.runtimeType_, | 64 Selectors.runtimeType_, |
| 65 Selectors.toString_, | 65 Selectors.toString_, |
| 66 Selectors.toStringGetter, | 66 Selectors.toStringGetter, |
| 67 Selectors.noSuchMethodGetter | 67 Selectors.noSuchMethodGetter |
| 68 ]; | 68 ]; |
| OLD | NEW |