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

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

Issue 2151373002: Share LibrarySpecificUnits when possible (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Clean-up Created 4 years, 5 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 | « no previous file | pkg/analyzer/lib/src/context/context.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/context/cache.dart
diff --git a/pkg/analyzer/lib/src/context/cache.dart b/pkg/analyzer/lib/src/context/cache.dart
index 1f0f42c9d06c24dba51ff510fe80b15bd02e2a34..a1c2aff02f9240af0a8f34cb02913dfc3f6b487b 100644
--- a/pkg/analyzer/lib/src/context/cache.dart
+++ b/pkg/analyzer/lib/src/context/cache.dart
@@ -14,6 +14,7 @@ import 'package:analyzer/src/generated/java_engine.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/utilities_collection.dart';
import 'package:analyzer/src/task/model.dart';
+import 'package:analyzer/task/dart.dart';
import 'package:analyzer/task/model.dart';
/**
@@ -313,6 +314,13 @@ class CacheEntry {
final AnalysisTarget target;
/**
+ * A library specific unit associated with the target if the target is a
+ * [Source], or `null` if the target is not a [Source] or if a library
+ * specific unit for the source has not yet been computed.
+ */
+ LibrarySpecificUnit librarySpecificUnit;
+
+ /**
* The partition that is responsible for this entry.
*/
CachePartition _partition;
@@ -1101,7 +1109,8 @@ abstract class CachePartition {
*/
void resultAccessed(AnalysisTarget target, ResultDescriptor descriptor) {
CacheFlushManager flushManager = _getFlushManager(descriptor);
- TargetedResult result = new TargetedResult(target, descriptor);
+ TargetedResult result =
+ new TargetedResult(context.canonicalizeTarget(target), descriptor);
flushManager.resultAccessed(result);
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698