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

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

Issue 2383203003: Add an analysis option to disable cache flushing. (Closed)
Patch Set: Created 4 years, 3 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 | « pkg/analyzer_cli/lib/src/driver.dart ('k') | pkg/analyzer_cli/test/options_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/options.dart
diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart
index c64eddc5e11cc62b49249ba0790855df49abc4e2..be7dbae4198a1040cd2cf1add84eb7cd4b4b7746 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -74,6 +74,11 @@ class CommandLineOptions {
/// A table mapping the names of defined variables to their values.
final Map<String, String> definedVariables;
+ /// Whether to disable cache flushing. This option can improve analysis
+ /// speed at the expense of memory usage. It may also be useful for working
+ /// around bugs.
+ final bool disableCacheFlushing;
+
/// Whether to report hints
final bool disableHints;
@@ -171,6 +176,7 @@ class CommandLineOptions {
dartSdkSummaryPath = args['dart-sdk-summary'],
definedVariables = definedVariables,
analysisOptionsFile = args['options'],
+ disableCacheFlushing = args['disable-cache-flushing'],
disableHints = args['no-hints'],
displayVersion = args['version'],
enableInitializingFormalAccess = args['initializing-formal-access'],
@@ -314,6 +320,7 @@ class CommandLineOptions {
help: 'Do not show hint results.',
defaultsTo: false,
negatable: false)
+ ..addFlag('disable-cache-flushing', defaultsTo: false, hide: true)
..addFlag('ignore-unrecognized-flags',
help: 'Ignore unrecognized command line flags.',
defaultsTo: false,
« no previous file with comments | « pkg/analyzer_cli/lib/src/driver.dart ('k') | pkg/analyzer_cli/test/options_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698