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

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

Issue 1210603002: Add an analyzer method to flush resolved ASTs (for testing). (Closed) Base URL: git@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
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 d20eff544b837409d2050db9c072f6cc80ee80af..912d4ae4cdf5fca34819e1aa7068d411da710130 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -1186,6 +1186,17 @@ class AnalysisContextImpl implements InternalAnalysisContext {
}
@override
+ void test_flushResolvedUnit(Source source) {
Brian Wilkerson 2015/06/24 16:56:58 The non-task-model version of this method flushes
Paul Berry 2015/06/24 20:08:31 Ok, as per our discussion, I've renamed this to te
+ CacheEntry entry = getCacheEntry(source);
+ entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED);
+ entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED);
+ entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED);
+ entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED);
+ entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED);
+ entry.setState(RESOLVED_UNIT, CacheState.FLUSHED);
+ }
+
+ @override
bool validateCacheConsistency() {
int consistencyCheckStart = JavaSystem.nanoTime();
HashSet<Source> changedSources = new HashSet<Source>();
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/engine.dart » ('j') | pkg/analyzer/lib/src/generated/engine.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698