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

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

Issue 622743002: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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/error.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 ae155e2a7d809cb1673260201a6f400ff80a5dc2..853080794bacb336d97c8a0752146d10c56924d5 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -1637,9 +1637,10 @@ class AnalysisContextImpl implements InternalAnalysisContext {
//
// Look for non-priority sources that need to be analyzed.
//
- MapIterator<Source, SourceEntry> iterator = _cache.iterator();
- while (iterator.moveNext()) {
- _getSourcesNeedingProcessing(iterator.key, iterator.value, false, hintsEnabled, sources);
+ WorkManager_WorkIterator iterator = _workManager.iterator();
+ while (iterator.hasNext) {
+ Source source = iterator.next();
+ _getSourcesNeedingProcessing(source, _cache.get(source), false, hintsEnabled, sources);
}
return new List<Source>.from(sources);
}
@@ -1771,16 +1772,18 @@ class AnalysisContextImpl implements InternalAnalysisContext {
return new AnalysisResult(_getChangeNotices(true), getEnd - getStart, null, -1);
}
String taskDescription = task.toString();
- if (!_reportedLoop && !_recentTasks.add(taskDescription)) {
- PrintStringWriter writer = new PrintStringWriter();
- writer.print("Performing repeated task: ");
- writer.println(taskDescription);
- for (String description in _recentTasks) {
- writer.print(" ");
- writer.println(description);
- }
- _logInformation(writer.toString());
- }
+ // if (!reportedLoop && !recentTasks.add(taskDescription)) {
+ // reportedLoop = true;
+ // @SuppressWarnings("resource")
+ // PrintStringWriter writer = new PrintStringWriter();
+ // writer.print("Performing repeated task: ");
+ // writer.println(taskDescription);
+ // for (String description : recentTasks) {
+ // writer.print(" ");
+ // writer.println(description);
+ // }
+ // logInformation(writer.toString());
+ // }
_notifyAboutToPerformTask(taskDescription);
if (_TRACE_PERFORM_TASK) {
print(taskDescription);
@@ -3358,18 +3361,6 @@ class AnalysisContextImpl implements InternalAnalysisContext {
_workManager.remove(sourcesToRemove[i]);
}
}
- // //
- // // Look for a non-priority source that needs to be analyzed and was missed by the loop above.
- // //
- // for (Map.Entry<Source, SourceEntry> entry : cache.entrySet()) {
- // source = entry.getKey();
- // TaskData taskData = getNextAnalysisTaskForSource(source, entry.getValue(), false, hintsEnabled);
- // AnalysisTask task = taskData.getTask();
- // if (task != null) {
- // System.out.println("Failed to analyze " + source.getFullName());
- // return task;
- // }
- // }
if (hasBlockedTask) {
// All of the analysis work is blocked waiting for an asynchronous task to complete.
return WaitForAsyncTask.instance;
@@ -6274,6 +6265,25 @@ class AnalysisEngine {
final PartitionManager partitionManager = new PartitionManager();
/**
+ * A flag indicating whether union types should be used.
+ */
+ bool enableUnionTypes = false;
+
+ /**
+ * A flag indicating whether union types should have strict semantics. This option has no effect
+ * when `enabledUnionTypes` is `false`.
+ */
+ bool strictUnionTypes = false;
+
+ /**
+ * Clear any caches holding on to analysis results so that a full re-analysis will be performed
+ * the next time an analysis context is created.
+ */
+ void clearCaches() {
+ partitionManager.clearCache();
+ }
+
+ /**
* Create a new context in which analysis can be performed.
*
* @return the analysis context that was created
@@ -12257,7 +12267,7 @@ class InstrumentedAnalysisContextImpl implements InternalAnalysisContext {
}
return result;
} finally {
- instrumentation.log2(2);
+ instrumentation.log2(15);
}
}
@@ -13219,6 +13229,13 @@ class PartitionManager {
static int _DEFAULT_SDK_CACHE_SIZE = 256;
/**
+ * Clear any cached data being maintained by this manager.
+ */
+ void clearCache() {
+ _sdkPartitions.clear();
+ }
+
+ /**
* Return the partition being used for the given SDK, creating the partition if necessary.
*
* @param sdk the SDK for which a partition is being requested
« no previous file with comments | « pkg/analyzer/lib/src/generated/element.dart ('k') | pkg/analyzer/lib/src/generated/error.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698