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

Side by Side Diff: pkg/analyzer_cli/lib/src/driver.dart

Issue 1848543002: Support --persistent_worker flag in --build-mode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixes for review comments. Created 4 years, 8 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
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_cli.src.driver; 5 library analyzer_cli.src.driver;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 if (!options.machineFormat) { 237 if (!options.machineFormat) {
238 stats.print(outSink); 238 stats.print(outSink);
239 } 239 }
240 240
241 return allResult; 241 return allResult;
242 } 242 }
243 243
244 /// Perform analysis in build mode according to the given [options]. 244 /// Perform analysis in build mode according to the given [options].
245 ErrorSeverity _buildModeAnalyze(CommandLineOptions options) { 245 ErrorSeverity _buildModeAnalyze(CommandLineOptions options) {
246 return _analyzeAllTag.makeCurrentWhile(() { 246 return _analyzeAllTag.makeCurrentWhile(() {
247 return new BuildMode(options, stats).analyze(); 247 if (options.buildModePersistentWorker) {
248 new WorkerLoop.std().run();
249 } else {
250 return new BuildMode(options, stats).analyze();
251 }
248 }); 252 });
249 } 253 }
250 254
251 /// Determine whether the context created during a previous call to 255 /// Determine whether the context created during a previous call to
252 /// [_analyzeAll] can be re-used in order to analyze using [options]. 256 /// [_analyzeAll] can be re-used in order to analyze using [options].
253 bool _canContextBeReused(CommandLineOptions options) { 257 bool _canContextBeReused(CommandLineOptions options) {
254 // TODO(paulberry): add a command-line option that disables context re-use. 258 // TODO(paulberry): add a command-line option that disables context re-use.
255 if (_context == null) { 259 if (_context == null) {
256 return false; 260 return false;
257 } 261 }
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 for (var package in packages) { 783 for (var package in packages) {
780 var packageName = path.basename(package.path); 784 var packageName = path.basename(package.path);
781 var realPath = package.resolveSymbolicLinksSync(); 785 var realPath = package.resolveSymbolicLinksSync();
782 result[packageName] = [ 786 result[packageName] = [
783 PhysicalResourceProvider.INSTANCE.getFolder(realPath) 787 PhysicalResourceProvider.INSTANCE.getFolder(realPath)
784 ]; 788 ];
785 } 789 }
786 return result; 790 return result;
787 } 791 }
788 } 792 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698