| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 class EnqueueTask extends CompilerTask { | 7 class EnqueueTask extends CompilerTask { |
| 8 final ResolutionEnqueuer resolution; | 8 final ResolutionEnqueuer resolution; |
| 9 final CodegenEnqueuer codegen; | 9 final CodegenEnqueuer codegen; |
| 10 | 10 |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 registerNewSelector(selector, universe.invokedSetters); | 304 registerNewSelector(selector, universe.invokedSetters); |
| 305 }); | 305 }); |
| 306 } | 306 } |
| 307 | 307 |
| 308 /// Called when [:const Symbol(name):] is seen. | 308 /// Called when [:const Symbol(name):] is seen. |
| 309 void registerConstSymbol(String name, TreeElements elements) { | 309 void registerConstSymbol(String name, TreeElements elements) { |
| 310 compiler.backend.registerConstSymbol(name, elements); | 310 compiler.backend.registerConstSymbol(name, elements); |
| 311 } | 311 } |
| 312 | 312 |
| 313 void pretendElementWasUsed(Element element, TreeElements elements) { | 313 void pretendElementWasUsed(Element element, TreeElements elements) { |
| 314 if (!compiler.backend.isNeededForReflection(element)) return; |
| 314 if (Elements.isUnresolved(element)) { | 315 if (Elements.isUnresolved(element)) { |
| 315 // Ignore. | 316 // Ignore. |
| 316 } else if (element.isSynthesized | 317 } else if (element.isSynthesized |
| 317 && element.getLibrary().isPlatformLibrary) { | 318 && element.getLibrary().isPlatformLibrary) { |
| 318 // TODO(ahe): Work-around for http://dartbug.com/11205. | 319 // TODO(ahe): Work-around for http://dartbug.com/11205. |
| 319 } else if (element.isConstructor()) { | 320 } else if (element.isConstructor()) { |
| 320 ClassElement cls = element.declaration.getEnclosingClass(); | 321 ClassElement cls = element.declaration.getEnclosingClass(); |
| 321 registerInstantiatedType(cls.rawType, elements); | 322 registerInstantiatedType(cls.rawType, elements); |
| 322 registerStaticUse(element.declaration); | 323 registerStaticUse(element.declaration); |
| 323 } else if (element.isMixinApplication) { | 324 } else if (element.isMixinApplication) { |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 while(!queue.isEmpty) { | 724 while(!queue.isEmpty) { |
| 724 // TODO(johnniwinther): Find an optimal process order for codegen. | 725 // TODO(johnniwinther): Find an optimal process order for codegen. |
| 725 f(queue.removeLast()); | 726 f(queue.removeLast()); |
| 726 } | 727 } |
| 727 } | 728 } |
| 728 | 729 |
| 729 void _logSpecificSummary(log(message)) { | 730 void _logSpecificSummary(log(message)) { |
| 730 log('Compiled ${generatedCode.length} methods.'); | 731 log('Compiled ${generatedCode.length} methods.'); |
| 731 } | 732 } |
| 732 } | 733 } |
| OLD | NEW |