Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: pkg/analyzer/lib/src/context/context.dart

Issue 1152773002: Manage 'libraries containing part' in DartWorkManager. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index 45f6abbb286a1afc03cca61c85b9a979373193eb..7f8d7daae82b5c8103ee4865f6fe1576d00a1d20 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -807,19 +807,7 @@ class AnalysisContextImpl implements InternalAnalysisContext {
if (kind == SourceKind.LIBRARY) {
return <Source>[source];
} else if (kind == SourceKind.PART) {
- List<Source> libraries = <Source>[];
- for (Source library in _cache.sources) {
- CacheEntry entry = _cache.get(library);
- if (entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY) {
- List<Source> parts = entry.getValue(INCLUDED_PARTS);
- if (parts.contains(source)) {
- libraries.add(library);
- }
- }
- }
- if (libraries.isNotEmpty) {
- return libraries;
- }
+ return dartWorkManager.getLibrariesContainingPart(source);
}
return Source.EMPTY_ARRAY;
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/dart_work_manager.dart » ('j') | pkg/analyzer/lib/src/task/dart_work_manager.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698