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

Unified Diff: pkg/analyzer/bin/analyzer.dart

Issue 973683004: Fully parse SDK files when analyzing in batch mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | pkg/analyzer/lib/src/analyzer_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/bin/analyzer.dart
diff --git a/pkg/analyzer/bin/analyzer.dart b/pkg/analyzer/bin/analyzer.dart
index 447b386bdd1a561312897678ba2fdca823a07b12..ccdc619de4c67eb3411fc37fb86ece954cf359f1 100644
--- a/pkg/analyzer/bin/analyzer.dart
+++ b/pkg/analyzer/bin/analyzer.dart
@@ -25,14 +25,14 @@ void main(List<String> args) {
if (options.shouldBatch) {
BatchRunner.runAsBatch(args, (List<String> args) {
CommandLineOptions options = CommandLineOptions.parse(args);
- return _analyzeAll(options);
+ return _analyzeAll(options, true);
});
} else {
- _analyzeAll(options);
+ _analyzeAll(options, false);
}
}
-_analyzeAll(CommandLineOptions options) {
+_analyzeAll(CommandLineOptions options, bool isBatch) {
if (!options.machineFormat) {
stdout.writeln("Analyzing ${options.sourceFiles}...");
}
@@ -53,31 +53,33 @@ _analyzeAll(CommandLineOptions options) {
// fail fast; don't analyze more files
return ErrorSeverity.ERROR;
}
- ErrorSeverity status = _runAnalyzer(options, sourcePath);
+ ErrorSeverity status = _runAnalyzer(options, sourcePath, isBatch);
allResult = allResult.max(status);
}
return allResult;
}
-_runAnalyzer(CommandLineOptions options, String sourcePath) {
+_runAnalyzer(CommandLineOptions options, String sourcePath, bool isBatch) {
if (options.warmPerf) {
int startTime = JavaSystem.currentTimeMillis();
- AnalyzerImpl analyzer = new AnalyzerImpl(sourcePath, options, startTime);
+ AnalyzerImpl analyzer =
+ new AnalyzerImpl(sourcePath, options, startTime, isBatch);
analyzer.analyzeSync(printMode: 2);
for (int i = 0; i < 8; i++) {
startTime = JavaSystem.currentTimeMillis();
- analyzer = new AnalyzerImpl(sourcePath, options, startTime);
+ analyzer = new AnalyzerImpl(sourcePath, options, startTime, isBatch);
analyzer.analyzeSync(printMode: 0);
}
PerformanceTag.reset();
startTime = JavaSystem.currentTimeMillis();
- analyzer = new AnalyzerImpl(sourcePath, options, startTime);
+ analyzer = new AnalyzerImpl(sourcePath, options, startTime, isBatch);
return analyzer.analyzeSync();
}
int startTime = JavaSystem.currentTimeMillis();
- AnalyzerImpl analyzer = new AnalyzerImpl(sourcePath, options, startTime);
+ AnalyzerImpl analyzer =
+ new AnalyzerImpl(sourcePath, options, startTime, isBatch);
var errorSeverity = analyzer.analyzeSync();
if (errorSeverity == ErrorSeverity.ERROR) {
exitCode = errorSeverity.ordinal;
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/analyzer_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698