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

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

Issue 1132103002: Remove memento. (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 | « 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 c9b9841b8d8648d0a5089a03602edbfc4e2d450a..6785a714e6a99868639063ae61c2addcceade794 100644
--- a/pkg/analyzer/lib/src/context/cache.dart
+++ b/pkg/analyzer/lib/src/context/cache.dart
@@ -259,17 +259,6 @@ class CacheEntry {
}
/**
- * Return the memento of the result represented by the given [descriptor].
- */
- Object getMemento(ResultDescriptor descriptor) {
- ResultData data = _resultMap[descriptor];
- if (data == null) {
- return null;
- }
- return data.memento;
- }
-
- /**
* Return the state of the result represented by the given [descriptor].
*/
CacheState getState(ResultDescriptor descriptor) {
@@ -380,11 +369,10 @@ class CacheEntry {
/**
* Set the value of the result represented by the given [descriptor] to the
- * given [value]. The optional [memento] may help to recompute [value] more
- * efficiently after invalidation.
+ * given [value].
*/
/*<V>*/ void setValue(ResultDescriptor /*<V>*/ descriptor, dynamic /*V*/
- value, List<TargetedResult> dependedOn, Object memento) {
+ value, List<TargetedResult> dependedOn) {
_validateStateChange(descriptor, CacheState.VALID);
TargetedResult thisResult = new TargetedResult(target, descriptor);
if (_partition != null) {
@@ -395,7 +383,6 @@ class CacheEntry {
_setDependedOnResults(data, thisResult, dependedOn);
data.state = CacheState.VALID;
data.value = value == null ? descriptor.defaultValue : value;
- data.memento = memento;
}
@override
@@ -788,12 +775,6 @@ class ResultData {
Object value;
/**
- * The optional data that is remembered with [value] and, when [value] is
- * invalidated, may help to recompute it more efficiently.
- */
- Object memento;
-
- /**
* A list of the results on which this result depends.
*/
List<TargetedResult> dependedOnResults = <TargetedResult>[];
@@ -818,7 +799,6 @@ class ResultData {
void flush() {
state = CacheState.FLUSHED;
value = descriptor.defaultValue;
- memento = null;
}
}
« 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