| 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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 globalInference.runGlobalTypeInference( | 713 globalInference.runGlobalTypeInference( |
| 714 mainFunction, closedWorld, closedWorldRefiner); | 714 mainFunction, closedWorld, closedWorldRefiner); |
| 715 | 715 |
| 716 if (stopAfterTypeInference) return; | 716 if (stopAfterTypeInference) return; |
| 717 | 717 |
| 718 backend.onTypeInferenceComplete(); | 718 backend.onTypeInferenceComplete(); |
| 719 | 719 |
| 720 reporter.log('Compiling...'); | 720 reporter.log('Compiling...'); |
| 721 phase = PHASE_COMPILING; | 721 phase = PHASE_COMPILING; |
| 722 | 722 |
| 723 enqueuer.codegen.applyImpact(backend.onCodegenStart()); | 723 enqueuer.codegen.applyImpact(backend.onCodegenStart(closedWorld)); |
| 724 if (compileAll) { | 724 if (compileAll) { |
| 725 libraryLoader.libraries.forEach((LibraryElement library) { | 725 libraryLoader.libraries.forEach((LibraryElement library) { |
| 726 enqueuer.codegen.applyImpact(computeImpactForLibrary(library)); | 726 enqueuer.codegen.applyImpact(computeImpactForLibrary(library)); |
| 727 }); | 727 }); |
| 728 } | 728 } |
| 729 processQueue(enqueuer.codegen, mainFunction, | 729 processQueue(enqueuer.codegen, mainFunction, |
| 730 onProgress: showCodegenProgress); | 730 onProgress: showCodegenProgress); |
| 731 enqueuer.codegen.logSummary(reporter.log); | 731 enqueuer.codegen.logSummary(reporter.log); |
| 732 | 732 |
| 733 int programSize = backend.assembleProgram(); | 733 int programSize = backend.assembleProgram(closedWorld); |
| 734 | 734 |
| 735 if (options.dumpInfo) { | 735 if (options.dumpInfo) { |
| 736 dumpInfoTask.reportSize(programSize); | 736 dumpInfoTask.reportSize(programSize); |
| 737 dumpInfoTask.dumpInfo(closedWorld); | 737 dumpInfoTask.dumpInfo(closedWorld); |
| 738 } | 738 } |
| 739 | 739 |
| 740 backend.sourceInformationStrategy.onComplete(); | 740 backend.sourceInformationStrategy.onComplete(); |
| 741 | 741 |
| 742 checkQueues(); | 742 checkQueues(); |
| 743 }); | 743 }); |
| (...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2229 _ElementScanner(this.scanner); | 2229 _ElementScanner(this.scanner); |
| 2230 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); | 2230 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); |
| 2231 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); | 2231 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); |
| 2232 } | 2232 } |
| 2233 | 2233 |
| 2234 class _EmptyEnvironment implements Environment { | 2234 class _EmptyEnvironment implements Environment { |
| 2235 const _EmptyEnvironment(); | 2235 const _EmptyEnvironment(); |
| 2236 | 2236 |
| 2237 String valueOf(String key) => null; | 2237 String valueOf(String key) => null; |
| 2238 } | 2238 } |
| OLD | NEW |