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

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

Issue 382953002: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | « pkg/analyzer/lib/src/generated/element.dart ('k') | pkg/analyzer/lib/src/generated/parser.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 c7442b81df4c5930f759cf52439b0941eef7029f..9fcadc7afaa74779c386f3b4150f3083e5b76649 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -5601,8 +5601,26 @@ class AnalysisContextImpl_CycleBuilder {
}
/**
+ * Ensure that the given library has an element model built for it. If another task needs to be
+ * executed first in order to build the element model, that task is placed in [taskData].
+ *
+ * @param library the library which needs an element model.
+ */
+ void _ensureElementModel(ResolvableLibrary library) {
+ Source librarySource = library.librarySource;
+ DartEntry libraryEntry = AnalysisContextImpl_this._getReadableDartEntry(librarySource);
+ if (libraryEntry != null && libraryEntry.getState(DartEntry.PARSED_UNIT) != CacheState.ERROR) {
+ AnalysisContextImpl_this._workManager.addFirst(librarySource, SourcePriority.LIBRARY);
+ if (_taskData == null) {
+ _taskData = AnalysisContextImpl_this._createResolveDartLibraryTask(librarySource, libraryEntry);
+ }
+ }
+ }
+
+ /**
* Ensure that all of the libraries that are exported by the given library (but are not
- * themselves in the cycle) have element models built for them.
+ * themselves in the cycle) have element models built for them. If another task needs to be
+ * executed first in order to build the element model, that task is placed in [taskData].
*
* @param library the library being tested
*/
@@ -5613,17 +5631,12 @@ class AnalysisContextImpl_CycleBuilder {
ResolvableLibrary dependency = dependencies[i];
if (!_librariesInCycle.contains(dependency) && visitedLibraries.add(dependency.librarySource)) {
if (dependency.libraryElement == null) {
- Source dependencySource = dependency.librarySource;
- AnalysisContextImpl_this._workManager.addFirst(dependencySource, SourcePriority.LIBRARY);
- if (_taskData == null) {
- _taskData = AnalysisContextImpl_this._createResolveDartLibraryTask(dependencySource, AnalysisContextImpl_this._getReadableDartEntry(dependencySource));
- return;
- }
+ _ensureElementModel(dependency);
} else {
_ensureExports(dependency, visitedLibraries);
- if (_taskData != null) {
- return;
- }
+ }
+ if (_taskData != null) {
+ return;
}
}
}
@@ -5631,11 +5644,10 @@ class AnalysisContextImpl_CycleBuilder {
/**
* Ensure that all of the libraries that are exported by the given library (but are not
- * themselves in the cycle) have element models built for them.
+ * themselves in the cycle) have element models built for them. If another task needs to be
+ * executed first in order to build the element model, that task is placed in [taskData].
*
* @param library the library being tested
- * @throws MissingDataException if there is at least one library being depended on that does not
- * have an element model built for it
*/
void _ensureImports(ResolvableLibrary library) {
List<ResolvableLibrary> dependencies = library.imports;
@@ -5643,10 +5655,8 @@ class AnalysisContextImpl_CycleBuilder {
for (int i = 0; i < dependencyCount; i++) {
ResolvableLibrary dependency = dependencies[i];
if (!_librariesInCycle.contains(dependency) && dependency.libraryElement == null) {
- Source dependencySource = dependency.librarySource;
- AnalysisContextImpl_this._workManager.addFirst(dependencySource, SourcePriority.LIBRARY);
- if (_taskData == null) {
- _taskData = AnalysisContextImpl_this._createResolveDartLibraryTask(dependencySource, AnalysisContextImpl_this._getReadableDartEntry(dependencySource));
+ _ensureElementModel(dependency);
+ if (_taskData != null) {
return;
}
}
@@ -6361,6 +6371,11 @@ class AnalysisOptionsImpl implements AnalysisOptions {
static bool DEFAULT_ENABLE_DEFERRED_LOADING = true;
/**
+ * The default value for enabling async support.
+ */
+ static bool DEFAULT_ENABLE_ASYNC = false;
+
+ /**
* A flag indicating whether analysis is to analyze Angular.
*/
bool analyzeAngular = true;
« no previous file with comments | « pkg/analyzer/lib/src/generated/element.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698