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.compiler_base; | 5 library dart2js.compiler_base; |
6 | 6 |
7 import 'dart:async' show EventSink, Future; | 7 import 'dart:async' show EventSink, Future; |
8 | 8 |
9 import '../compiler_new.dart' as api; | 9 import '../compiler_new.dart' as api; |
10 import 'cache_strategy.dart' show CacheStrategy; | 10 import 'cache_strategy.dart' show CacheStrategy; |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 /** | 828 /** |
829 * Empty the [world] queue. | 829 * Empty the [world] queue. |
830 */ | 830 */ |
831 void emptyQueue(Enqueuer world) => | 831 void emptyQueue(Enqueuer world) => |
832 selfTask.measureSubtask("Compiler.emptyQueue", () { | 832 selfTask.measureSubtask("Compiler.emptyQueue", () { |
833 world.forEach((WorkItem work) { | 833 world.forEach((WorkItem work) { |
834 reporter.withCurrentElement( | 834 reporter.withCurrentElement( |
835 work.element, | 835 work.element, |
836 () => selfTask.measureSubtask("world.applyImpact", () { | 836 () => selfTask.measureSubtask("world.applyImpact", () { |
837 world.applyImpact( | 837 world.applyImpact( |
838 work.element, | |
839 selfTask.measureSubtask( | 838 selfTask.measureSubtask( |
840 "work.run", () => work.run(this, world))); | 839 "work.run", () => work.run(this, world)), |
| 840 impactSource: work.element); |
841 })); | 841 })); |
842 }); | 842 }); |
843 }); | 843 }); |
844 | 844 |
845 void processQueue(Enqueuer world, Element main) => | 845 void processQueue(Enqueuer world, Element main) => |
846 selfTask.measureSubtask("Compiler.processQueue", () { | 846 selfTask.measureSubtask("Compiler.processQueue", () { |
847 world.nativeEnqueuer.processNativeClasses(libraryLoader.libraries); | 847 world.nativeEnqueuer.processNativeClasses(libraryLoader.libraries); |
848 if (main != null && !main.isMalformed) { | 848 if (main != null && !main.isMalformed) { |
849 FunctionElement mainMethod = main; | 849 FunctionElement mainMethod = main; |
850 mainMethod.computeType(resolution); | 850 mainMethod.computeType(resolution); |
(...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2245 _ElementScanner(this.scanner); | 2245 _ElementScanner(this.scanner); |
2246 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); | 2246 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); |
2247 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); | 2247 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); |
2248 } | 2248 } |
2249 | 2249 |
2250 class _EmptyEnvironment implements Environment { | 2250 class _EmptyEnvironment implements Environment { |
2251 const _EmptyEnvironment(); | 2251 const _EmptyEnvironment(); |
2252 | 2252 |
2253 String valueOf(String key) => null; | 2253 String valueOf(String key) => null; |
2254 } | 2254 } |
OLD | NEW |