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

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

Issue 1164223002: Fix several tests when the new task model is enabled (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/testing/element_factory.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7fb0d1ca9d733dee3b4cac2fddc93a4a4f39a18c..4dcc14354bad3db20721c48bc891a371c0313893 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -350,6 +350,9 @@ class AnalysisContextImpl implements InternalAnalysisContext {
List<AnalysisTarget> get priorityTargets => prioritySources;
@override
+ CachePartition get privateAnalysisCachePartition => _privatePartition;
+
+ @override
SourceFactory get sourceFactory => _sourceFactory;
@override
@@ -767,38 +770,39 @@ class AnalysisContextImpl implements InternalAnalysisContext {
@override
List<Source> getHtmlFilesReferencing(Source source) {
+ // TODO(brianwilkerson) Implement this.
SourceKind sourceKind = getKindOf(source);
if (sourceKind == null) {
return Source.EMPTY_LIST;
}
List<Source> htmlSources = <Source>[];
- while (true) {
- if (sourceKind == SourceKind.PART) {
- List<Source> librarySources = getLibrariesContaining(source);
- for (Source source in _cache.sources) {
- CacheEntry entry = _cache.get(source);
- if (entry.getValue(SOURCE_KIND) == SourceKind.HTML) {
- List<Source> referencedLibraries =
- (entry as HtmlEntry).getValue(HtmlEntry.REFERENCED_LIBRARIES);
- if (_containsAny(referencedLibraries, librarySources)) {
- htmlSources.add(source);
- }
- }
- }
- } else {
- for (Source source in _cache.sources) {
- CacheEntry entry = _cache.get(source);
- if (entry.getValue(SOURCE_KIND) == SourceKind.HTML) {
- List<Source> referencedLibraries =
- (entry as HtmlEntry).getValue(HtmlEntry.REFERENCED_LIBRARIES);
- if (_contains(referencedLibraries, source)) {
- htmlSources.add(source);
- }
- }
- }
- }
- break;
- }
+// while (true) {
+// if (sourceKind == SourceKind.PART) {
+// List<Source> librarySources = getLibrariesContaining(source);
+// for (Source source in _cache.sources) {
+// CacheEntry entry = _cache.get(source);
+// if (entry.getValue(SOURCE_KIND) == SourceKind.HTML) {
+// List<Source> referencedLibraries =
+// (entry as HtmlEntry).getValue(HtmlEntry.REFERENCED_LIBRARIES);
+// if (_containsAny(referencedLibraries, librarySources)) {
+// htmlSources.add(source);
+// }
+// }
+// }
+// } else {
+// for (Source source in _cache.sources) {
+// CacheEntry entry = _cache.get(source);
+// if (entry.getValue(SOURCE_KIND) == SourceKind.HTML) {
+// List<Source> referencedLibraries =
+// (entry as HtmlEntry).getValue(HtmlEntry.REFERENCED_LIBRARIES);
+// if (_contains(referencedLibraries, source)) {
+// htmlSources.add(source);
+// }
+// }
+// }
+// }
+// break;
+// }
if (htmlSources.isEmpty) {
return Source.EMPTY_LIST;
}
@@ -1174,8 +1178,8 @@ class AnalysisContextImpl implements InternalAnalysisContext {
@override
void visitCacheItems(void callback(Source source, SourceEntry dartEntry,
DataDescriptor rowDesc, CacheState state)) {
- // TODO(brianwilkerson) Figure out where this is used and adjust the call
- // sites to use CacheEntry's.
+ // TODO(brianwilkerson) Figure out where this is used and either remove it
+ // or adjust the call sites to use CacheEntry's.
// bool hintsEnabled = _options.hint;
// bool lintsEnabled = _options.lint;
// MapIterator<AnalysisTarget, cache.CacheEntry> iterator = _cache.iterator();
@@ -1561,9 +1565,6 @@ class AnalysisContextImpl implements InternalAnalysisContext {
}
}
- @override
- CachePartition get privateAnalysisCachePartition => _privatePartition;
-
/**
* Remove the given [source] from the priority order if it is in the list.
*/
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/testing/element_factory.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698