| 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/ast.dart'; | 9 import 'package:analyzer/src/generated/ast.dart'; |
| 10 import 'package:analyzer/src/generated/engine.dart' | 10 import 'package:analyzer/src/generated/engine.dart' |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 buffer.write('time = '); | 480 buffer.write('time = '); |
| 481 buffer.write(modificationTime); | 481 buffer.write(modificationTime); |
| 482 List<ResultDescriptor> results = _resultMap.keys.toList(); | 482 List<ResultDescriptor> results = _resultMap.keys.toList(); |
| 483 results.sort((ResultDescriptor first, ResultDescriptor second) => | 483 results.sort((ResultDescriptor first, ResultDescriptor second) => |
| 484 first.toString().compareTo(second.toString())); | 484 first.toString().compareTo(second.toString())); |
| 485 for (ResultDescriptor result in results) { | 485 for (ResultDescriptor result in results) { |
| 486 ResultData data = _resultMap[result]; | 486 ResultData data = _resultMap[result]; |
| 487 buffer.write('; '); | 487 buffer.write('; '); |
| 488 buffer.write(result.toString()); | 488 buffer.write(result.toString()); |
| 489 buffer.write(' = '); | 489 buffer.write(' = '); |
| 490 buffer.write(data..state); | 490 buffer.write(data.state); |
| 491 } | 491 } |
| 492 } | 492 } |
| 493 } | 493 } |
| 494 | 494 |
| 495 /** | 495 /** |
| 496 * A single partition in an LRU cache of information related to analysis. | 496 * A single partition in an LRU cache of information related to analysis. |
| 497 */ | 497 */ |
| 498 abstract class CachePartition { | 498 abstract class CachePartition { |
| 499 /** | 499 /** |
| 500 * The context that owns this partition. Multiple contexts can reference a | 500 * The context that owns this partition. Multiple contexts can reference a |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 * structures in the cache, using the [retentionPolicy] to determine which | 820 * structures in the cache, using the [retentionPolicy] to determine which |
| 821 * AST structures to flush. | 821 * AST structures to flush. |
| 822 */ | 822 */ |
| 823 UniversalCachePartition(InternalAnalysisContext context, int maxCacheSize, | 823 UniversalCachePartition(InternalAnalysisContext context, int maxCacheSize, |
| 824 CacheRetentionPolicy retentionPolicy) | 824 CacheRetentionPolicy retentionPolicy) |
| 825 : super(context, maxCacheSize, retentionPolicy); | 825 : super(context, maxCacheSize, retentionPolicy); |
| 826 | 826 |
| 827 @override | 827 @override |
| 828 bool contains(AnalysisTarget target) => true; | 828 bool contains(AnalysisTarget target) => true; |
| 829 } | 829 } |
| OLD | NEW |