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

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

Issue 1906543002: Remove a couple of unnecessary is checks (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/instrumentation/instrumentation.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 51bcc57d787862e5122030eef00ccc8c492f8d82..e5224838b8c4a753428d574cde103a260242ee2e 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -809,13 +809,14 @@ class AnalysisContextImpl implements InternalAnalysisContext {
CacheEntry entry = _cache.get(target);
if (entry == null) {
entry = new CacheEntry(target);
+ ImplicitAnalysisEvent event = null;
if (target is Source) {
entry.modificationTime = getModificationStamp(target);
+ event = new ImplicitAnalysisEvent(target, true);
}
_cache.put(entry);
- if (target is Source) {
- _implicitAnalysisEventsController
- .add(new ImplicitAnalysisEvent(target, true));
+ if (event != null) {
+ _implicitAnalysisEventsController.add(event);
}
}
return entry;
« no previous file with comments | « pkg/analyzer/lib/instrumentation/instrumentation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698