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

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

Issue 2221893003: pkg/compiler: fix imports (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.optimize_interceptors; 5 library dart2js.cps_ir.optimize_interceptors;
6 6
7 import 'optimizers.dart';
8 import 'cps_ir_nodes.dart';
9 import 'loop_hierarchy.dart';
10 import 'cps_fragment.dart';
11 import '../constants/values.dart'; 7 import '../constants/values.dart';
12 import '../elements/elements.dart'; 8 import '../elements/elements.dart';
9 import '../io/source_information.dart' show SourceInformation;
13 import '../js_backend/backend_helpers.dart' show BackendHelpers; 10 import '../js_backend/backend_helpers.dart' show BackendHelpers;
14 import '../js_backend/js_backend.dart' show JavaScriptBackend; 11 import '../js_backend/js_backend.dart' show JavaScriptBackend;
15 import '../types/types.dart' show TypeMask; 12 import '../types/types.dart' show TypeMask;
16 import '../io/source_information.dart' show SourceInformation;
17 import '../world.dart'; 13 import '../world.dart';
14 import 'cps_fragment.dart';
15 import 'cps_ir_nodes.dart';
16 import 'loop_hierarchy.dart';
17 import 'optimizers.dart';
18 import 'type_mask_system.dart'; 18 import 'type_mask_system.dart';
19 19
20 /// Replaces `getInterceptor` calls with interceptor constants when possible, 20 /// Replaces `getInterceptor` calls with interceptor constants when possible,
21 /// or with "almost constant" expressions like "x && CONST" when the input 21 /// or with "almost constant" expressions like "x && CONST" when the input
22 /// is either null or has a known interceptor. 22 /// is either null or has a known interceptor.
23 /// 23 ///
24 /// Narrows the set of intercepted classes for interceptor calls. 24 /// Narrows the set of intercepted classes for interceptor calls.
25 /// 25 ///
26 /// Replaces calls on interceptors with one-shot interceptors. 26 /// Replaces calls on interceptors with one-shot interceptors.
27 class OptimizeInterceptors extends TrampolineRecursiveVisitor implements Pass { 27 class OptimizeInterceptors extends TrampolineRecursiveVisitor implements Pass {
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 sharedConstantFor.remove(prim.value); 318 sharedConstantFor.remove(prim.value);
319 }); 319 });
320 } 320 }
321 return next; 321 return next;
322 } 322 }
323 323
324 bool shouldShareConstant(Constant constant) { 324 bool shouldShareConstant(Constant constant) {
325 return constant.value.isInterceptor; 325 return constant.value.isInterceptor;
326 } 326 }
327 } 327 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/loop_invariant_branch.dart ('k') | pkg/compiler/lib/src/cps_ir/optimizers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698