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 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 _reporter.reportSuppressedMessagesSummary(); | 844 _reporter.reportSuppressedMessagesSummary(); |
845 | 845 |
846 if (compilationFailed) { | 846 if (compilationFailed) { |
847 if (!options.generateCodeWithCompileTimeErrors) return; | 847 if (!options.generateCodeWithCompileTimeErrors) return; |
848 if (!backend | 848 if (!backend |
849 .enableCodegenWithErrorsIfSupported(NO_LOCATION_SPANNABLE)) { | 849 .enableCodegenWithErrorsIfSupported(NO_LOCATION_SPANNABLE)) { |
850 return; | 850 return; |
851 } | 851 } |
852 } | 852 } |
853 | 853 |
854 if (options.resolveOnly) { | 854 if (options.resolveOnly && !compilationFailed) { |
855 reporter.log('Serializing to ${options.resolutionOutput}'); | 855 reporter.log('Serializing to ${options.resolutionOutput}'); |
856 serialization | 856 serialization |
857 .serializeToSink(userOutputProvider.createEventSink('', 'data'), | 857 .serializeToSink(userOutputProvider.createEventSink('', 'data'), |
858 libraryLoader.libraries.where((LibraryElement library) { | 858 libraryLoader.libraries.where((LibraryElement library) { |
859 return !serialization.isDeserialized(library); | 859 return !serialization.isDeserialized(library); |
860 })); | 860 })); |
861 } | 861 } |
862 if (options.analyzeOnly) { | 862 if (options.analyzeOnly) { |
863 if (!analyzeAll && !compilationFailed) { | 863 if (!analyzeAll && !compilationFailed) { |
864 // No point in reporting unused code when [analyzeAll] is true: all | 864 // No point in reporting unused code when [analyzeAll] is true: all |
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2123 _ElementScanner(this.scanner); | 2123 _ElementScanner(this.scanner); |
2124 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); | 2124 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); |
2125 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); | 2125 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); |
2126 } | 2126 } |
2127 | 2127 |
2128 class _EmptyEnvironment implements Environment { | 2128 class _EmptyEnvironment implements Environment { |
2129 const _EmptyEnvironment(); | 2129 const _EmptyEnvironment(); |
2130 | 2130 |
2131 String valueOf(String key) => null; | 2131 String valueOf(String key) => null; |
2132 } | 2132 } |
OLD | NEW |