Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: pkg/compiler/lib/src/cps_ir/optimizers.dart

Issue 1537663002: dart2js: Initial implementation of inlining. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebaseline test expectations and fix a bug (typo). Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 'cps_ir_nodes.dart'; 7 import 'cps_ir_nodes.dart';
8 import '../constants/values.dart'; 8 import '../constants/values.dart';
9 9
10 export 'type_propagation.dart' show TypePropagator; 10 export 'type_propagation.dart' show TypePropagator;
11 export 'scalar_replacement.dart' show ScalarReplacer; 11 export 'scalar_replacement.dart' show ScalarReplacer;
12 export 'redundant_phi.dart' show RedundantPhiEliminator; 12 export 'redundant_phi.dart' show RedundantPhiEliminator;
13 export 'redundant_join.dart' show RedundantJoinEliminator; 13 export 'redundant_join.dart' show RedundantJoinEliminator;
14 export 'shrinking_reductions.dart' show ShrinkingReducer; 14 export 'shrinking_reductions.dart' show ShrinkingReducer;
15 export 'mutable_ssa.dart' show MutableVariableEliminator; 15 export 'mutable_ssa.dart' show MutableVariableEliminator;
16 export 'insert_refinements.dart' show InsertRefinements; 16 export 'insert_refinements.dart' show InsertRefinements;
17 export 'update_refinements.dart' show UpdateRefinements; 17 export 'update_refinements.dart' show UpdateRefinements;
18 export 'redundant_refinement.dart' show RedundantRefinementEliminator; 18 export 'redundant_refinement.dart' show RedundantRefinementEliminator;
19 export 'optimize_interceptors.dart' show OptimizeInterceptors; 19 export 'optimize_interceptors.dart' show OptimizeInterceptors;
20 export 'bounds_checker.dart' show BoundsChecker; 20 export 'bounds_checker.dart' show BoundsChecker;
21 export 'backward_null_check_remover.dart' show BackwardNullCheckRemover; 21 export 'backward_null_check_remover.dart' show BackwardNullCheckRemover;
22 export 'gvn.dart' show GVN; 22 export 'gvn.dart' show GVN;
23 export 'inline.dart' show Inliner;
23 export 'eagerly_load_statics.dart' show EagerlyLoadStatics; 24 export 'eagerly_load_statics.dart' show EagerlyLoadStatics;
24 export 'parent_visitor.dart' show ParentVisitor; 25 export 'parent_visitor.dart' show ParentVisitor;
25 26
26 /// An optimization pass over the CPS IR. 27 /// An optimization pass over the CPS IR.
27 abstract class Pass { 28 abstract class Pass {
28 /// Applies optimizations to root, rewriting it in the process. 29 /// Applies optimizations to root, rewriting it in the process.
29 void rewrite(FunctionDefinition root); 30 void rewrite(FunctionDefinition root);
30 31
31 String get passName; 32 String get passName;
32 } 33 }
(...skipping 10 matching lines...) Expand all
43 value is StringConstantValue && value.primitiveValue.isEmpty; 44 value is StringConstantValue && value.primitiveValue.isEmpty;
44 } 45 }
45 46
46 /// Returns true if [value] satisfies a branching condition with the 47 /// Returns true if [value] satisfies a branching condition with the
47 /// given strictness. 48 /// given strictness.
48 /// 49 ///
49 /// For non-strict, this is the opposite of [isFalsyConstant]. 50 /// For non-strict, this is the opposite of [isFalsyConstant].
50 bool isTruthyConstant(ConstantValue value, {bool strict: false}) { 51 bool isTruthyConstant(ConstantValue value, {bool strict: false}) {
51 return strict ? value.isTrue : !isFalsyConstant(value); 52 return strict ? value.isTrue : !isFalsyConstant(value);
52 } 53 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/inline.dart ('k') | pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698