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

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

Issue 1127483002: More fixes to the new analysis context implementation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments 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/lib/src/context/context.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/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
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
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 }
OLDNEW
« 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