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

Side by Side Diff: pkg/analyzer/lib/src/context/cache.dart

Issue 1129173003: Flush memento objects. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/cache_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.context.cache; 5 library analyzer.src.context.cache;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/generated/engine.dart' 9 import 'package:analyzer/src/generated/engine.dart'
10 show AnalysisEngine, CacheState, InternalAnalysisContext, RetentionPriority; 10 show AnalysisEngine, CacheState, InternalAnalysisContext, RetentionPriority;
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 state = CacheState.INVALID; 810 state = CacheState.INVALID;
811 value = descriptor.defaultValue; 811 value = descriptor.defaultValue;
812 } 812 }
813 813
814 /** 814 /**
815 * Flush this value. 815 * Flush this value.
816 */ 816 */
817 void flush() { 817 void flush() {
818 state = CacheState.FLUSHED; 818 state = CacheState.FLUSHED;
819 value = descriptor.defaultValue; 819 value = descriptor.defaultValue;
820 memento = null;
820 } 821 }
821 } 822 }
822 823
823 /** 824 /**
824 * A cache partition that contains all of the targets in the SDK. 825 * A cache partition that contains all of the targets in the SDK.
825 */ 826 */
826 class SdkCachePartition extends CachePartition { 827 class SdkCachePartition extends CachePartition {
827 /** 828 /**
828 * Initialize a newly created cache partition, belonging to the given 829 * Initialize a newly created cache partition, belonging to the given
829 * [context]. 830 * [context].
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 class UniversalCachePartition extends CachePartition { 887 class UniversalCachePartition extends CachePartition {
887 /** 888 /**
888 * Initialize a newly created cache partition, belonging to the given 889 * Initialize a newly created cache partition, belonging to the given
889 * [context]. 890 * [context].
890 */ 891 */
891 UniversalCachePartition(InternalAnalysisContext context) : super(context); 892 UniversalCachePartition(InternalAnalysisContext context) : super(context);
892 893
893 @override 894 @override
894 bool contains(AnalysisTarget target) => true; 895 bool contains(AnalysisTarget target) => true;
895 } 896 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/cache_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698