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 599bb4cc8c9477ffb1bd4750beb70d6d64e0d3df..5cf5af512bdaa5dc431e71326285463fa54b87ea 100644 |
--- a/pkg/analyzer/lib/src/context/context.dart |
+++ b/pkg/analyzer/lib/src/context/context.dart |
@@ -701,8 +701,8 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
cache.CacheEntry getCacheEntry(AnalysisTarget target) { |
cache.CacheEntry entry = _cache.get(target); |
if (entry == null) { |
- entry = new cache.CacheEntry(); |
- _cache.put(target, entry); |
+ entry = new cache.CacheEntry(target); |
+ _cache.put(entry); |
} |
return entry; |
} |
@@ -1430,10 +1430,10 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
* entry that was created. |
*/ |
cache.CacheEntry _createCacheEntry(Source source, bool explicitlyAdded) { |
- cache.CacheEntry entry = new cache.CacheEntry(); |
+ cache.CacheEntry entry = new cache.CacheEntry(source); |
entry.modificationTime = getModificationStamp(source); |
entry.explicitlyAdded = explicitlyAdded; |
- _cache.put(source, entry); |
+ _cache.put(entry); |
return entry; |
} |