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

Unified Diff: pkg/analyzer_cli/lib/src/driver.dart

Issue 2698993002: Use only MemoryByteStore in analyzer_cli. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/driver.dart
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index f3c57a2ae99c0a6f00728150a8dd329cfffa696c..e6e3ad7197df7846220bbfdb77f1013a3f0f4b0c 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -21,7 +21,6 @@ import 'package:analyzer/source/sdk_ext.dart';
import 'package:analyzer/src/context/builder.dart';
import 'package:analyzer/src/dart/analysis/byte_store.dart';
import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/dart/analysis/file_byte_store.dart';
import 'package:analyzer/src/dart/analysis/file_state.dart';
import 'package:analyzer/src/dart/sdk/sdk.dart';
import 'package:analyzer/src/generated/constant.dart';
@@ -78,7 +77,6 @@ class Driver implements CommandLineStarter {
new PerformanceTag("Driver._analyzeAll");
static ByteStore analysisDriverMemoryByteStore = new MemoryByteStore();
- static ByteStore analysisDriverFileByteStore = _createFileByteStore();
/// The plugins that are defined outside the `analyzer_cli` package.
List<Plugin> _userDefinedPlugins = <Plugin>[];
@@ -581,9 +579,7 @@ class Driver implements CommandLineStarter {
scheduler,
log,
resourceProvider,
- options.useAnalysisDriverMemoryByteStore
- ? analysisDriverMemoryByteStore
- : analysisDriverFileByteStore,
+ analysisDriverMemoryByteStore,
new FileContentOverlay(),
'test',
context.sourceFactory,
@@ -788,22 +784,6 @@ class Driver implements CommandLineStarter {
context.analysisOptions = analysisOptions;
}
- /**
- * If the state location can be accessed, return the file byte store,
- * otherwise return the memory byte store.
- */
- static ByteStore _createFileByteStore() {
- const int M = 1024 * 1024 /*1 MiB*/;
- const int G = 1024 * 1024 * 1024 /*1 GiB*/;
- file_system.Folder stateLocation =
- PhysicalResourceProvider.INSTANCE.getStateLocation('.analysis-driver');
- if (stateLocation == null) {
- return new MemoryByteStore();
- }
- return new MemoryCachingByteStore(
- new EvictingFileByteStore(stateLocation.path, G), 64 * M);
- }
-
/// Perform a deep comparison of two string lists.
static bool _equalLists(List<String> l1, List<String> l2) {
if (l1.length != l2.length) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698