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

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

Issue 1135613002: Set CacheEntry.target in the contructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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/context/cache.dart ('k') | pkg/analyzer/test/src/context/cache_test.dart » ('j') | 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 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;
}
« no previous file with comments | « pkg/analyzer/lib/src/context/cache.dart ('k') | pkg/analyzer/test/src/context/cache_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698