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

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

Issue 1762723002: Cleanup 1: split parts into their own libraries, remove unused imports (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 library dart2js.cps_ir.path_based_optimizer; 4 library dart2js.cps_ir.path_based_optimizer;
5 5
6 import 'cps_ir_nodes.dart'; 6 import 'cps_ir_nodes.dart';
7 import 'optimizers.dart'; 7 import 'optimizers.dart';
8 import 'cps_fragment.dart'; 8 import 'cps_fragment.dart';
9 import '../js_backend/js_backend.dart'; 9 import '../js_backend/js_backend.dart';
10 import '../constants/values.dart'; 10 import '../constants/values.dart';
11 import '../elements/elements.dart';
12 import '../universe/selector.dart';
13 import '../types/types.dart';
14 import 'type_mask_system.dart'; 11 import 'type_mask_system.dart';
15 12
16 /// Optimizations based on intraprocedural forward dataflow analysis, taking 13 /// Optimizations based on intraprocedural forward dataflow analysis, taking
17 /// into account path information that is not expressed by [Refinement] nodes. 14 /// into account path information that is not expressed by [Refinement] nodes.
18 /// 15 ///
19 /// --- 16 /// ---
20 /// 17 ///
21 /// Removes branches that branch on the same value as a previously seen branch. 18 /// Removes branches that branch on the same value as a previously seen branch.
22 /// For example: 19 /// For example:
23 /// 20 ///
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 node.selector)) { 172 node.selector)) {
176 Constant dummy = new Constant(new IntConstantValue(0)) 173 Constant dummy = new Constant(new IntConstantValue(0))
177 ..type = typeSystem.intType; 174 ..type = typeSystem.intType;
178 new LetPrim(dummy).insertAbove(node.parent); 175 new LetPrim(dummy).insertAbove(node.parent);
179 node.argumentRefs[0].changeTo(dummy); 176 node.argumentRefs[0].changeTo(dummy);
180 node.callingConvention = CallingConvention.DummyIntercepted; 177 node.callingConvention = CallingConvention.DummyIntercepted;
181 } 178 }
182 } 179 }
183 } 180 }
184 } 181 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698