| 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 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 5 import '../common/codegen.dart' show CodegenWorkItem; |
| 6 import '../common/tasks.dart' show CompilerTask; | 6 import '../common/tasks.dart' show CompilerTask; |
| 7 import '../compiler.dart' show Compiler; | 7 import '../compiler.dart' show Compiler; |
| 8 import '../constants/constant_system.dart'; | 8 import '../constants/constant_system.dart'; |
| 9 import '../constants/values.dart'; | 9 import '../constants/values.dart'; |
| 10 import '../core_types.dart' show CoreClasses; | 10 import '../core_types.dart' show CoreClasses; |
| 11 import '../dart_types.dart'; | 11 import '../dart_types.dart'; |
| 12 import '../elements/elements.dart'; | 12 import '../elements/elements.dart'; |
| 13 import '../js/js.dart' as js; | 13 import '../js/js.dart' as js; |
| 14 import '../js_backend/backend_helpers.dart' show BackendHelpers; | 14 import '../js_backend/backend_helpers.dart' show BackendHelpers; |
| 15 import '../js_backend/js_backend.dart'; | 15 import '../js_backend/js_backend.dart'; |
| 16 import '../native/native.dart' as native; | 16 import '../native/native.dart' as native; |
| 17 import '../tree/tree.dart' as ast; | 17 import '../tree/tree.dart' as ast; |
| 18 import '../types/types.dart'; | 18 import '../types/types.dart'; |
| 19 import '../universe/selector.dart' show Selector; | 19 import '../universe/selector.dart' show Selector; |
| 20 import '../universe/side_effects.dart' show SideEffects; | 20 import '../universe/side_effects.dart' show SideEffects; |
| 21 import '../util/util.dart'; | 21 import '../util/util.dart'; |
| 22 import '../world.dart' show ClassWorld, World; | 22 import '../world.dart' show ClassWorld, World; |
| 23 | 23 import 'interceptor_simplifier.dart'; |
| 24 import 'nodes.dart'; | 24 import 'nodes.dart'; |
| 25 import 'types.dart'; |
| 25 import 'types_propagation.dart'; | 26 import 'types_propagation.dart'; |
| 26 import 'types.dart'; | |
| 27 import 'value_range_analyzer.dart'; | 27 import 'value_range_analyzer.dart'; |
| 28 import 'value_set.dart'; | 28 import 'value_set.dart'; |
| 29 import 'interceptor_simplifier.dart'; | |
| 30 | 29 |
| 31 abstract class OptimizationPhase { | 30 abstract class OptimizationPhase { |
| 32 String get name; | 31 String get name; |
| 33 void visitGraph(HGraph graph); | 32 void visitGraph(HGraph graph); |
| 34 } | 33 } |
| 35 | 34 |
| 36 class SsaOptimizerTask extends CompilerTask { | 35 class SsaOptimizerTask extends CompilerTask { |
| 37 final JavaScriptBackend backend; | 36 final JavaScriptBackend backend; |
| 38 SsaOptimizerTask(JavaScriptBackend backend) | 37 SsaOptimizerTask(JavaScriptBackend backend) |
| 39 : this.backend = backend, | 38 : this.backend = backend, |
| (...skipping 2345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2385 | 2384 |
| 2386 keyedValues.forEach((receiver, values) { | 2385 keyedValues.forEach((receiver, values) { |
| 2387 result.keyedValues[receiver] = | 2386 result.keyedValues[receiver] = |
| 2388 new Map<HInstruction, HInstruction>.from(values); | 2387 new Map<HInstruction, HInstruction>.from(values); |
| 2389 }); | 2388 }); |
| 2390 | 2389 |
| 2391 result.nonEscapingReceivers.addAll(nonEscapingReceivers); | 2390 result.nonEscapingReceivers.addAll(nonEscapingReceivers); |
| 2392 return result; | 2391 return result; |
| 2393 } | 2392 } |
| 2394 } | 2393 } |
| OLD | NEW |