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 Enqueuer codegen; | 8 final Enqueuer codegen; |
9 final Enqueuer resolution; | 9 final Enqueuer resolution; |
10 | 10 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 compiler.enabledInvokeOn = true; | 110 compiler.enabledInvokeOn = true; |
111 } | 111 } |
112 | 112 |
113 // Enable isolate support if we start using something from the | 113 // Enable isolate support if we start using something from the |
114 // isolate library. | 114 // isolate library. |
115 LibraryElement library = element.getLibrary(); | 115 LibraryElement library = element.getLibrary(); |
116 if (!compiler.hasIsolateSupport() | 116 if (!compiler.hasIsolateSupport() |
117 && library.uri.toString() == 'dart:isolate') { | 117 && library.uri.toString() == 'dart:isolate') { |
118 compiler.enableIsolateSupport(library); | 118 compiler.enableIsolateSupport(library); |
119 } | 119 } |
| 120 else if (!compiler.hasMirrorsSupport() |
| 121 && library.uri.toString() == 'dart:mirrors') { |
| 122 compiler.enableMirrorsSupport(library); |
| 123 } |
120 | 124 |
121 nativeEnqueuer.registerElement(element); | 125 nativeEnqueuer.registerElement(element); |
122 } | 126 } |
123 | 127 |
124 /** | 128 /** |
125 * Documentation wanted -- johnniwinther | 129 * Documentation wanted -- johnniwinther |
126 * | 130 * |
127 * Invariant: [element] must be a declaration element. | 131 * Invariant: [element] must be a declaration element. |
128 */ | 132 */ |
129 void eagerRecompile(Element element) { | 133 void eagerRecompile(Element element) { |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 | 421 |
418 String toString() => 'Enqueuer($name)'; | 422 String toString() => 'Enqueuer($name)'; |
419 | 423 |
420 void logSummary(log(message)) { | 424 void logSummary(log(message)) { |
421 log(isResolutionQueue | 425 log(isResolutionQueue |
422 ? 'Resolved ${resolvedElements.length} elements.' | 426 ? 'Resolved ${resolvedElements.length} elements.' |
423 : 'Compiled ${universe.generatedCode.length} methods.'); | 427 : 'Compiled ${universe.generatedCode.length} methods.'); |
424 nativeEnqueuer.logSummary(log); | 428 nativeEnqueuer.logSummary(log); |
425 } | 429 } |
426 } | 430 } |
OLD | NEW |