| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 analyzer.src.generated.sdk2; | 5 library analyzer.src.generated.sdk2; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:io' as io; | 9 import 'dart:io' as io; |
| 10 | 10 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 } on FormatException catch (exception, stackTrace) { | 148 } on FormatException catch (exception, stackTrace) { |
| 149 AnalysisEngine.instance.logger.logInformation( | 149 AnalysisEngine.instance.logger.logInformation( |
| 150 "Failed to create URI: $path", | 150 "Failed to create URI: $path", |
| 151 new CaughtException(exception, stackTrace)); | 151 new CaughtException(exception, stackTrace)); |
| 152 } | 152 } |
| 153 return null; | 153 return null; |
| 154 } | 154 } |
| 155 | 155 |
| 156 @override | 156 @override |
| 157 PackageBundle getLinkedBundle() { | 157 PackageBundle getLinkedBundle() { |
| 158 bool strongMode = _analysisOptions?.strongMode ?? false; | 158 if (_useSummary) { |
| 159 _sdkBundle ??= getSummarySdkBundle(strongMode); | 159 bool strongMode = _analysisOptions?.strongMode ?? false; |
| 160 return _sdkBundle; | 160 _sdkBundle ??= getSummarySdkBundle(strongMode); |
| 161 return _sdkBundle; |
| 162 } |
| 163 return null; |
| 161 } | 164 } |
| 162 | 165 |
| 163 String getRelativePathFromFile(File file); | 166 String getRelativePathFromFile(File file); |
| 164 | 167 |
| 165 @override | 168 @override |
| 166 SdkLibrary getSdkLibrary(String dartUri) => libraryMap.getLibrary(dartUri); | 169 SdkLibrary getSdkLibrary(String dartUri) => libraryMap.getLibrary(dartUri); |
| 167 | 170 |
| 168 /** | 171 /** |
| 169 * Return the [PackageBundle] for this SDK, if it exists, or `null` otherwise. | 172 * Return the [PackageBundle] for this SDK, if it exists, or `null` otherwise. |
| 170 * This method should not be used outside of `analyzer` and `analyzer_cli` | 173 * This method should not be used outside of `analyzer` and `analyzer_cli` |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 SdkLibrariesReader_LibraryBuilder libraryBuilder = | 869 SdkLibrariesReader_LibraryBuilder libraryBuilder = |
| 867 new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths); | 870 new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths); |
| 868 // If any syntactic errors were found then don't try to visit the AST | 871 // If any syntactic errors were found then don't try to visit the AST |
| 869 // structure. | 872 // structure. |
| 870 if (!errorListener.errorReported) { | 873 if (!errorListener.errorReported) { |
| 871 unit.accept(libraryBuilder); | 874 unit.accept(libraryBuilder); |
| 872 } | 875 } |
| 873 return libraryBuilder.librariesMap; | 876 return libraryBuilder.librariesMap; |
| 874 } | 877 } |
| 875 } | 878 } |
| OLD | NEW |