Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 import 'dart:io' as io; | 1 import 'dart:io' as io; |
| 2 | 2 |
| 3 import 'package:analyzer/dart/element/element.dart'; | 3 import 'package:analyzer/dart/element/element.dart'; |
| 4 import 'package:analyzer/src/context/cache.dart'; | 4 import 'package:analyzer/src/context/cache.dart'; |
| 5 import 'package:analyzer/src/context/context.dart'; | 5 import 'package:analyzer/src/context/context.dart'; |
| 6 import 'package:analyzer/src/dart/element/element.dart'; | 6 import 'package:analyzer/src/dart/element/element.dart'; |
| 7 import 'package:analyzer/src/generated/engine.dart'; | 7 import 'package:analyzer/src/generated/engine.dart'; |
| 8 import 'package:analyzer/src/generated/java_io.dart'; | 8 import 'package:analyzer/src/generated/java_io.dart'; |
| 9 import 'package:analyzer/src/generated/resolver.dart'; | 9 import 'package:analyzer/src/generated/resolver.dart'; |
| 10 import 'package:analyzer/src/generated/source.dart'; | 10 import 'package:analyzer/src/generated/source.dart'; |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 267 /** | 267 /** |
| 268 * Map from the URI of a library to the linked summary of that library. | 268 * Map from the URI of a library to the linked summary of that library. |
| 269 */ | 269 */ |
| 270 final Map<String, LinkedLibrary> linkedMap = <String, LinkedLibrary>{}; | 270 final Map<String, LinkedLibrary> linkedMap = <String, LinkedLibrary>{}; |
| 271 | 271 |
| 272 /** | 272 /** |
| 273 * Map from the URI of a library to the summary path that contained it. | 273 * Map from the URI of a library to the summary path that contained it. |
| 274 */ | 274 */ |
| 275 final Map<String, String> uriToSummaryPath = <String, String>{}; | 275 final Map<String, String> uriToSummaryPath = <String, String>{}; |
| 276 | 276 |
| 277 SummaryDataStore(Iterable<String> summaryPaths) { | 277 SummaryDataStore(Iterable<String> summaryPaths, [PackageBundle bundle]) { |
|
Paul Berry
2016/07/26 21:16:22
These changes shouldn't be necessary--the caller s
priscillalee
2016/07/26 21:32:48
Done.
| |
| 278 summaryPaths.forEach(_fillMaps); | 278 summaryPaths.forEach(_fillMaps); |
| 279 if (bundle != null) addBundle('dart_sdk.sum', bundle); | |
| 279 } | 280 } |
| 280 | 281 |
| 281 /** | 282 /** |
| 282 * Add the given [bundle] loaded from the file with the given [path]. | 283 * Add the given [bundle] loaded from the file with the given [path]. |
| 283 */ | 284 */ |
| 284 void addBundle(String path, PackageBundle bundle) { | 285 void addBundle(String path, PackageBundle bundle) { |
| 285 bundles.add(bundle); | 286 bundles.add(bundle); |
| 286 for (int i = 0; i < bundle.unlinkedUnitUris.length; i++) { | 287 for (int i = 0; i < bundle.unlinkedUnitUris.length; i++) { |
| 287 String uri = bundle.unlinkedUnitUris[i]; | 288 String uri = bundle.unlinkedUnitUris[i]; |
| 288 uriToSummaryPath[uri] = path; | 289 uriToSummaryPath[uri] = path; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 340 * also provides [summaryPath]. | 341 * also provides [summaryPath]. |
| 341 */ | 342 */ |
| 342 class _InSummaryFallbackSource extends FileBasedSource | 343 class _InSummaryFallbackSource extends FileBasedSource |
| 343 implements InSummarySource { | 344 implements InSummarySource { |
| 344 @override | 345 @override |
| 345 final String summaryPath; | 346 final String summaryPath; |
| 346 | 347 |
| 347 _InSummaryFallbackSource(JavaFile file, Uri uri, this.summaryPath) | 348 _InSummaryFallbackSource(JavaFile file, Uri uri, this.summaryPath) |
| 348 : super(file, uri); | 349 : super(file, uri); |
| 349 } | 350 } |
| OLD | NEW |