OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |