| 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 library dart2js.common.codegen; | 5 library dart2js.common.codegen; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../compiler.dart' show | 8 import '../compiler.dart' show |
| 9 Compiler; | 9 Compiler; |
| 10 import '../constants/values.dart' show | 10 import '../constants/values.dart' show |
| 11 ConstantValue; | 11 ConstantValue; |
| 12 import '../dart_types.dart' show | 12 import '../dart_types.dart' show |
| 13 DartType, | 13 DartType, |
| 14 InterfaceType; | 14 InterfaceType; |
| 15 import '../elements/elements.dart' show | 15 import '../elements/elements.dart' show |
| 16 AstElement, | 16 AstElement, |
| 17 ClassElement, | 17 ClassElement, |
| 18 Element, | 18 Element, |
| 19 FunctionElement, | 19 FunctionElement, |
| 20 LocalFunctionElement; | 20 LocalFunctionElement; |
| 21 import '../enqueue.dart' show | 21 import '../enqueue.dart' show |
| 22 CodegenEnqueuer; | 22 CodegenEnqueuer; |
| 23 import '../resolution/tree_elements.dart' show | 23 import '../resolution/tree_elements.dart' show |
| 24 TreeElements; | 24 TreeElements; |
| 25 import '../universe/universe.dart' show | |
| 26 UniverseSelector; | |
| 27 import '../universe/use.dart' show | 25 import '../universe/use.dart' show |
| 26 DynamicUse, |
| 28 StaticUse; | 27 StaticUse; |
| 29 import '../universe/world_impact.dart' show | 28 import '../universe/world_impact.dart' show |
| 30 WorldImpact, | 29 WorldImpact, |
| 31 WorldImpactBuilder; | 30 WorldImpactBuilder; |
| 32 import '../util/util.dart' show | 31 import '../util/util.dart' show |
| 33 Pair, | 32 Pair, |
| 34 Setlet; | 33 Setlet; |
| 35 import 'registry.dart' show | 34 import 'registry.dart' show |
| 36 Registry, | 35 Registry, |
| 37 EagerRegistry; | 36 EagerRegistry; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 177 |
| 179 @deprecated | 178 @deprecated |
| 180 void registerInstantiatedClass(ClassElement element) { | 179 void registerInstantiatedClass(ClassElement element) { |
| 181 registerInstantiation(element.rawType); | 180 registerInstantiation(element.rawType); |
| 182 } | 181 } |
| 183 | 182 |
| 184 void registerStaticUse(StaticUse staticUse) { | 183 void registerStaticUse(StaticUse staticUse) { |
| 185 worldImpact.registerStaticUse(staticUse); | 184 worldImpact.registerStaticUse(staticUse); |
| 186 } | 185 } |
| 187 | 186 |
| 188 void registerDynamicUse(UniverseSelector selector) { | 187 void registerDynamicUse(DynamicUse dynamicUse) { |
| 189 worldImpact.registerDynamicUse(selector); | 188 worldImpact.registerDynamicUse(dynamicUse); |
| 190 compiler.dumpInfoTask.elementUsesSelector(currentElement, selector); | 189 compiler.dumpInfoTask.elementUsesSelector(currentElement, dynamicUse); |
| 191 } | 190 } |
| 192 | 191 |
| 193 void registerIsCheck(DartType type) { | 192 void registerIsCheck(DartType type) { |
| 194 worldImpact.registerIsCheck(type); | 193 worldImpact.registerIsCheck(type); |
| 195 } | 194 } |
| 196 | 195 |
| 197 void registerCompileTimeConstant(ConstantValue constant) { | 196 void registerCompileTimeConstant(ConstantValue constant) { |
| 198 worldImpact.registerCompileTimeConstant(constant); | 197 worldImpact.registerCompileTimeConstant(constant); |
| 199 } | 198 } |
| 200 | 199 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 258 |
| 260 TreeElements get resolutionTree => element.resolvedAst.elements; | 259 TreeElements get resolutionTree => element.resolvedAst.elements; |
| 261 | 260 |
| 262 WorldImpact run(Compiler compiler, CodegenEnqueuer world) { | 261 WorldImpact run(Compiler compiler, CodegenEnqueuer world) { |
| 263 if (world.isProcessed(element)) return const WorldImpact(); | 262 if (world.isProcessed(element)) return const WorldImpact(); |
| 264 | 263 |
| 265 registry = new CodegenRegistry(compiler, element); | 264 registry = new CodegenRegistry(compiler, element); |
| 266 return compiler.codegen(this, world); | 265 return compiler.codegen(this, world); |
| 267 } | 266 } |
| 268 } | 267 } |
| OLD | NEW |