| 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 | 410 |
| 411 if (elements == null) { | 411 if (elements == null) { |
| 412 queue.add( | 412 queue.add( |
| 413 new ResolutionWorkItem(element, itemCompilationContextCreator())); | 413 new ResolutionWorkItem(element, itemCompilationContextCreator())); |
| 414 } | 414 } |
| 415 | 415 |
| 416 // Enable isolate support if we start using something from the | 416 // Enable isolate support if we start using something from the |
| 417 // isolate library, or timers for the async library. | 417 // isolate library, or timers for the async library. |
| 418 LibraryElement library = element.getLibrary(); | 418 LibraryElement library = element.getLibrary(); |
| 419 if (!compiler.hasIsolateSupport()) { | 419 if (!compiler.hasIsolateSupport()) { |
| 420 String uri = library.uri.toString(); | 420 String uri = library.canonicalUri.toString(); |
| 421 if (uri == 'dart:isolate') { | 421 if (uri == 'dart:isolate') { |
| 422 enableIsolateSupport(library); | 422 enableIsolateSupport(library); |
| 423 } else if (uri == 'dart:async') { | 423 } else if (uri == 'dart:async') { |
| 424 ClassElement cls = element.getEnclosingClass(); | 424 ClassElement cls = element.getEnclosingClass(); |
| 425 if (cls != null && cls.name == const SourceString('Timer')) { | 425 if (cls != null && cls.name == const SourceString('Timer')) { |
| 426 // The [:Timer:] class uses the event queue of the isolate | 426 // The [:Timer:] class uses the event queue of the isolate |
| 427 // library, so we make sure that event queue is generated. | 427 // library, so we make sure that event queue is generated. |
| 428 enableIsolateSupport(library); | 428 enableIsolateSupport(library); |
| 429 } | 429 } |
| 430 } | 430 } |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 while(!queue.isEmpty) { | 552 while(!queue.isEmpty) { |
| 553 // TODO(johnniwinther): Find an optimal process order for codegen. | 553 // TODO(johnniwinther): Find an optimal process order for codegen. |
| 554 f(queue.removeLast()); | 554 f(queue.removeLast()); |
| 555 } | 555 } |
| 556 } | 556 } |
| 557 | 557 |
| 558 void _logSpecificSummary(log(message)) { | 558 void _logSpecificSummary(log(message)) { |
| 559 log('Compiled ${universe.generatedCode.length} methods.'); | 559 log('Compiled ${universe.generatedCode.length} methods.'); |
| 560 } | 560 } |
| 561 } | 561 } |
| OLD | NEW |