Skip to content

Commit 4ce76d4

Browse files
scheglovcommit-bot@chromium.org
authored andcommitted
Remove AnalysisCache, CachePartition, SdkCachePartition.
Change-Id: I8d6291f5292638571ae7dbf848f15acb2a9af8bb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122283 Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
1 parent 7d474c9 commit 4ce76d4

File tree

4 files changed

+0
-66
lines changed

4 files changed

+0
-66
lines changed

pkg/analyzer/lib/src/context/cache.dart

Lines changed: 0 additions & 18 deletions
This file was deleted.

pkg/analyzer/lib/src/context/context.dart

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
import 'package:analyzer/src/context/cache.dart';
65
import 'package:analyzer/src/generated/constant.dart';
76
import 'package:analyzer/src/generated/engine.dart';
87
import 'package:analyzer/src/generated/resolver.dart';
9-
import 'package:analyzer/src/generated/sdk.dart' show DartSdk;
108
import 'package:analyzer/src/generated/source.dart';
119

1210
/**
@@ -87,32 +85,6 @@ class AnalysisContextImpl implements InternalAnalysisContext {
8785
TypeSystem get typeSystem {
8886
return _typeSystem ??= Dart2TypeSystem(typeProvider);
8987
}
90-
91-
/**
92-
* Create an analysis cache based on the given source [factory].
93-
*/
94-
AnalysisCache createCacheFromSourceFactory(SourceFactory factory) {
95-
throw UnimplementedError();
96-
}
97-
}
98-
99-
/**
100-
* An object that manages the partitions that can be shared between analysis
101-
* contexts.
102-
*/
103-
class PartitionManager {
104-
/**
105-
* Clear any cached data being maintained by this manager.
106-
*/
107-
void clearCache() {}
108-
109-
/**
110-
* Return the partition being used for the given [sdk], creating the partition
111-
* if necessary.
112-
*/
113-
SdkCachePartition forSdk(DartSdk sdk) {
114-
throw UnimplementedError();
115-
}
11688
}
11789

11890
/**
@@ -134,9 +106,4 @@ class SdkAnalysisContext extends AnalysisContextImpl {
134106
void set analysisOptions(AnalysisOptions options) {
135107
throw new StateError('AnalysisOptions of SDK context cannot be changed.');
136108
}
137-
138-
@override
139-
AnalysisCache createCacheFromSourceFactory(SourceFactory factory) {
140-
throw UnimplementedError();
141-
}
142109
}

pkg/analyzer/lib/src/generated/engine.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,6 @@ class AnalysisEngine {
132132
InstrumentationService _instrumentationService =
133133
InstrumentationService.NULL_SERVICE;
134134

135-
/// The partition manager being used to manage the shared partitions.
136-
final PartitionManager partitionManager = new PartitionManager();
137-
138135
AnalysisEngine._();
139136

140137
/// Return the instrumentation service that is to be used by this analysis
@@ -164,7 +161,6 @@ class AnalysisEngine {
164161
/// Clear any caches holding on to analysis results so that a full re-analysis
165162
/// will be performed the next time an analysis context is created.
166163
void clearCaches() {
167-
partitionManager.clearCache();
168164
// See https://github.com/dart-lang/sdk/issues/30314.
169165
StringToken.canonicalizer.clear();
170166
}

pkg/analyzer/lib/src/test_utilities/mock_sdk.dart

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
import 'package:analyzer/file_system/file_system.dart';
66
import 'package:analyzer/file_system/memory_file_system.dart';
7-
import 'package:analyzer/src/context/cache.dart';
87
import 'package:analyzer/src/context/context.dart';
9-
import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine;
108
import 'package:analyzer/src/generated/sdk.dart';
119
import 'package:analyzer/src/generated/source.dart';
1210
import 'package:analyzer/src/summary/idl.dart' show PackageBundle;
@@ -1100,13 +1098,4 @@ class _SdkAnalysisContext extends AnalysisContextImpl {
11001098
final DartSdk sdk;
11011099

11021100
_SdkAnalysisContext(this.sdk);
1103-
1104-
@override
1105-
AnalysisCache createCacheFromSourceFactory(SourceFactory factory) {
1106-
if (factory == null) {
1107-
return super.createCacheFromSourceFactory(factory);
1108-
}
1109-
return new AnalysisCache(
1110-
<CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
1111-
}
11121101
}

0 commit comments

Comments
 (0)