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

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

Issue 1842363004: More strong mode fixes for analyzer (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Backout options changes Created 4 years, 9 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/task/dart.dart
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index 751ef5370a35685345ccad1cf401ab558210fa69..bd548cb59485e7d5b1d05e994782e4c888f81c67 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -49,9 +49,22 @@ const ResultCachingPolicy<CompilationUnit> AST_CACHING_POLICY =
const SimpleResultCachingPolicy(16384, 16384);
/**
+ * The [ResultCachingPolicy] for lists of [ConstantEvaluationTarget]s.
+ */
+const ResultCachingPolicy<List<ConstantEvaluationTarget>>
+ CONSTANT_EVALUATION_TARGET_LIST_POLICY =
+ const SimpleResultCachingPolicy(-1, -1);
+
+/**
+ * The [ResultCachingPolicy] for [ConstantEvaluationTarget]s.
+ */
+const ResultCachingPolicy<ConstantEvaluationTarget>
+ CONSTANT_EVALUATION_TARGET_POLICY = const SimpleResultCachingPolicy(-1, -1);
+
+/**
* The [ResultCachingPolicy] for [Element]s.
*/
-const ResultCachingPolicy ELEMENT_CACHING_POLICY =
+const ResultCachingPolicy<Element> ELEMENT_CACHING_POLICY =
const SimpleResultCachingPolicy(-1, -1);
/**
@@ -61,6 +74,18 @@ const ResultCachingPolicy<Token> TOKEN_STREAM_CACHING_POLICY =
const SimpleResultCachingPolicy(1, 1);
/**
+ * The [ResultCachingPolicy] for [UsedImportedElements]s.
+ */
+const ResultCachingPolicy<UsedImportedElements> USED_IMPORTED_ELEMENTS_POLICY =
+ const SimpleResultCachingPolicy(-1, -1);
+
+/**
+ * The [ResultCachingPolicy] for [UsedLocalElements]s.
+ */
+const ResultCachingPolicy<UsedLocalElements> USED_LOCAL_ELEMENTS_POLICY =
+ const SimpleResultCachingPolicy(-1, -1);
+
+/**
* The errors produced while resolving a library directives.
*
* The list will be empty if there were no errors, but will not be `null`.
@@ -94,7 +119,7 @@ final ListResultDescriptor<ConstantEvaluationTarget>
COMPILATION_UNIT_CONSTANTS =
new ListResultDescriptor<ConstantEvaluationTarget>(
'COMPILATION_UNIT_CONSTANTS', null,
- cachingPolicy: ELEMENT_CACHING_POLICY);
+ cachingPolicy: CONSTANT_EVALUATION_TARGET_LIST_POLICY);
/**
* The element model associated with a single compilation unit.
@@ -151,7 +176,7 @@ final ListResultDescriptor<ConstantEvaluationTarget>
*/
final ResultDescriptor<ConstantEvaluationTarget> CONSTANT_VALUE =
new ResultDescriptor<ConstantEvaluationTarget>('CONSTANT_VALUE', null,
- cachingPolicy: ELEMENT_CACHING_POLICY);
+ cachingPolicy: CONSTANT_EVALUATION_TARGET_POLICY);
/**
* The sources representing the libraries that include a given source as a part.
@@ -775,14 +800,14 @@ final ResultDescriptor<TypeProvider> TYPE_PROVIDER =
*/
final ResultDescriptor<UsedImportedElements> USED_IMPORTED_ELEMENTS =
new ResultDescriptor<UsedImportedElements>('USED_IMPORTED_ELEMENTS', null,
- cachingPolicy: ELEMENT_CACHING_POLICY);
+ cachingPolicy: USED_IMPORTED_ELEMENTS_POLICY);
/**
* The [UsedLocalElements] of a [LibrarySpecificUnit].
*/
final ResultDescriptor<UsedLocalElements> USED_LOCAL_ELEMENTS =
new ResultDescriptor<UsedLocalElements>('USED_LOCAL_ELEMENTS', null,
- cachingPolicy: ELEMENT_CACHING_POLICY);
+ cachingPolicy: USED_LOCAL_ELEMENTS_POLICY);
/**
* The errors produced while resolving variable references in a compilation unit.
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.dart ('k') | pkg/analyzer/lib/src/task/dart_work_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698