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 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 selfTask.measureSubtask( | 843 selfTask.measureSubtask( |
844 "work.run", () => work.run(this, enqueuer)), | 844 "work.run", () => work.run(this, enqueuer)), |
845 impactSource: work.element); | 845 impactSource: work.element); |
846 })); | 846 })); |
847 }); | 847 }); |
848 }); | 848 }); |
849 } | 849 } |
850 | 850 |
851 void processQueue(Enqueuer enqueuer, Element main) { | 851 void processQueue(Enqueuer enqueuer, Element main) { |
852 selfTask.measureSubtask("Compiler.processQueue", () { | 852 selfTask.measureSubtask("Compiler.processQueue", () { |
853 WorldImpactBuilderImpl nativeImpact = new WorldImpactBuilderImpl(); | 853 enqueuer.applyImpact( |
854 enqueuer.nativeEnqueuer | 854 impactStrategy, |
855 .processNativeClasses(nativeImpact, libraryLoader.libraries); | 855 enqueuer.nativeEnqueuer |
856 enqueuer.applyImpact(impactStrategy, nativeImpact); | 856 .processNativeClasses(libraryLoader.libraries)); |
857 if (main != null && !main.isMalformed) { | 857 if (main != null && !main.isMalformed) { |
858 FunctionElement mainMethod = main; | 858 FunctionElement mainMethod = main; |
859 mainMethod.computeType(resolution); | 859 mainMethod.computeType(resolution); |
860 if (mainMethod.functionSignature.parameterCount != 0) { | 860 if (mainMethod.functionSignature.parameterCount != 0) { |
861 // The first argument could be a list of strings. | 861 // The first argument could be a list of strings. |
862 backend.backendClasses.listImplementation.ensureResolved(resolution); | 862 backend.backendClasses.listImplementation.ensureResolved(resolution); |
863 enqueuer.registerInstantiatedType( | 863 enqueuer.registerInstantiatedType( |
864 backend.backendClasses.listImplementation.rawType); | 864 backend.backendClasses.listImplementation.rawType); |
865 backend.backendClasses.stringImplementation | 865 backend.backendClasses.stringImplementation |
866 .ensureResolved(resolution); | 866 .ensureResolved(resolution); |
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2258 _ElementScanner(this.scanner); | 2258 _ElementScanner(this.scanner); |
2259 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); | 2259 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); |
2260 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); | 2260 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); |
2261 } | 2261 } |
2262 | 2262 |
2263 class _EmptyEnvironment implements Environment { | 2263 class _EmptyEnvironment implements Environment { |
2264 const _EmptyEnvironment(); | 2264 const _EmptyEnvironment(); |
2265 | 2265 |
2266 String valueOf(String key) => null; | 2266 String valueOf(String key) => null; |
2267 } | 2267 } |
OLD | NEW |