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

Unified Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 627133002: Uncomment and clean up engine_test.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rollback ServerRefactoring change Created 6 years, 2 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/java_core.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/engine.dart
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 853080794bacb336d97c8a0752146d10c56924d5..60904c2d53d02bc620ab237e939973fed209fc14 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -998,12 +998,22 @@ class AnalysisContextImpl implements InternalAnalysisContext {
/**
* Initialize a newly created analysis context.
*/
- AnalysisContextImpl() : super() {
+ AnalysisContextImpl() {
_resultRecorder = new AnalysisContextImpl_AnalysisTaskResultRecorder(this);
_privatePartition = new UniversalCachePartition(this, AnalysisOptionsImpl.DEFAULT_CACHE_SIZE, new AnalysisContextImpl_ContextRetentionPolicy(this));
_cache = createCacheFromSourceFactory(null);
}
+ IncrementalAnalysisCache get test_incrementalAnalysisCache {
Brian Wilkerson 2014/10/05 17:54:37 I really dislike having methods that exist only fo
scheglov 2014/10/05 19:55:36 These methods are used instead of using reflection
+ return _incrementalAnalysisCache;
+ }
+
+ set test_incrementalAnalysisCache(IncrementalAnalysisCache value) {
+ _incrementalAnalysisCache = value;
+ }
+
+ List<Source> get test_priorityOrder => _priorityOrder;
+
@override
void addListener(AnalysisListener listener) {
if (!_listeners.contains(listener)) {
@@ -1400,8 +1410,7 @@ class AnalysisContextImpl implements InternalAnalysisContext {
}
List<Source> htmlSources = new List<Source>();
while (true) {
- if (sourceKind == SourceKind.LIBRARY) {
- } else if (sourceKind == SourceKind.PART) {
+ if (sourceKind == SourceKind.PART) {
List<Source> librarySources = getLibrariesContaining(source);
MapIterator<Source, SourceEntry> partIterator = _cache.iterator();
while (partIterator.moveNext()) {
@@ -1413,6 +1422,17 @@ class AnalysisContextImpl implements InternalAnalysisContext {
}
}
}
+ } else {
+ MapIterator<Source, SourceEntry> iterator = _cache.iterator();
+ while (iterator.moveNext()) {
+ SourceEntry sourceEntry = iterator.value;
+ if (sourceEntry.kind == SourceKind.HTML) {
+ List<Source> referencedLibraries = (sourceEntry as HtmlEntry).getValue(HtmlEntry.REFERENCED_LIBRARIES);
+ if (_contains(referencedLibraries, source)) {
+ htmlSources.add(iterator.key);
+ }
+ }
+ }
}
break;
}
@@ -13190,11 +13210,11 @@ class ParseHtmlTask extends AnalysisTask {
*/
List<Source> get librarySources {
List<Source> libraries = new List<Source>();
- _unit.accept(new RecursiveXmlVisitor_ParseHtmlTask_getLibrarySources(this, libraries));
+ _unit.accept(new ParseHtmlTask_getLibrarySources(this, libraries));
if (libraries.isEmpty) {
return Source.EMPTY_ARRAY;
}
- return new List.from(libraries);
+ return libraries;
}
/**
@@ -13909,12 +13929,12 @@ class RecursiveXmlVisitor_AngularHtmlUnitResolver_visitModelDirectives extends h
}
}
-class RecursiveXmlVisitor_ParseHtmlTask_getLibrarySources extends ht.RecursiveXmlVisitor<Object> {
- final ParseHtmlTask ParseHtmlTask_this;
+class ParseHtmlTask_getLibrarySources extends ht.RecursiveXmlVisitor<Object> {
+ final ParseHtmlTask _task;
List<Source> libraries;
- RecursiveXmlVisitor_ParseHtmlTask_getLibrarySources(this.ParseHtmlTask_this, this.libraries) : super();
+ ParseHtmlTask_getLibrarySources(this._task, this.libraries) : super();
@override
Object visitHtmlScriptTagNode(ht.HtmlScriptTagNode node) {
@@ -13928,11 +13948,11 @@ class RecursiveXmlVisitor_ParseHtmlTask_getLibrarySources extends ht.RecursiveXm
try {
Uri uri = new Uri(path: scriptAttribute.text);
String fileName = uri.path;
- Source librarySource = ParseHtmlTask_this.context.sourceFactory.resolveUri(ParseHtmlTask_this.source, fileName);
- if (ParseHtmlTask_this.context.exists(librarySource)) {
+ Source librarySource = _task.context.sourceFactory.resolveUri(_task.source, fileName);
+ if (_task.context.exists(librarySource)) {
libraries.add(librarySource);
}
- } on URISyntaxException catch (e) {
+ } on FormatException catch (e) {
}
}
return super.visitHtmlScriptTagNode(node);
@@ -15553,7 +15573,7 @@ class WorkManager {
* work manager in the order in which they are to be analyzed.
*/
class WorkManager_WorkIterator {
- final WorkManager WorkManager_this;
+ final WorkManager _manager;
/**
* The index of the work queue through which we are currently iterating.
@@ -15568,7 +15588,7 @@ class WorkManager_WorkIterator {
/**
* Initialize a newly created iterator to be ready to return the first element in the iteration.
*/
- WorkManager_WorkIterator(this.WorkManager_this) {
+ WorkManager_WorkIterator(this._manager) {
_advance();
}
@@ -15577,7 +15597,7 @@ class WorkManager_WorkIterator {
*
* @return `true` if there is another [Source] available for processing
*/
- bool get hasNext => _queueIndex < WorkManager_this._workQueues.length;
+ bool get hasNext => _queueIndex < _manager._workQueues.length;
/**
* Return the next [Source] available for processing and advance so that the returned
@@ -15589,7 +15609,7 @@ class WorkManager_WorkIterator {
if (!hasNext) {
throw new NoSuchElementException();
}
- Source source = WorkManager_this._workQueues[_queueIndex][_index];
+ Source source = _manager._workQueues[_queueIndex][_index];
_advance();
return source;
}
@@ -15600,10 +15620,10 @@ class WorkManager_WorkIterator {
*/
void _advance() {
_index++;
- if (_index >= WorkManager_this._workQueues[_queueIndex].length) {
+ if (_index >= _manager._workQueues[_queueIndex].length) {
_index = 0;
_queueIndex++;
- while (_queueIndex < WorkManager_this._workQueues.length && WorkManager_this._workQueues[_queueIndex].isEmpty) {
+ while (_queueIndex < _manager._workQueues.length && _manager._workQueues[_queueIndex].isEmpty) {
_queueIndex++;
}
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/java_core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698