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

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

Issue 2968403002: Remove the --build-summary-only-diet option. (Closed)
Patch Set: Created 3 years, 5 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.build_mode; 5 library analyzer_cli.src.build_mode;
6 6
7 import 'dart:io' as io; 7 import 'dart:io' as io;
8 8
9 import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit; 9 import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit;
10 import 'package:analyzer/error/error.dart'; 10 import 'package:analyzer/error/error.dart';
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 // Create the context. 319 // Create the context.
320 context = AnalysisEngine.instance.createAnalysisContext(); 320 context = AnalysisEngine.instance.createAnalysisContext();
321 context.sourceFactory = new SourceFactory(<UriResolver>[ 321 context.sourceFactory = new SourceFactory(<UriResolver>[
322 new DartUriResolver(sdk), 322 new DartUriResolver(sdk),
323 new InSummaryUriResolver(resourceProvider, summaryDataStore), 323 new InSummaryUriResolver(resourceProvider, summaryDataStore),
324 new ExplicitSourceResolver(uriToFileMap) 324 new ExplicitSourceResolver(uriToFileMap)
325 ]); 325 ]);
326 326
327 // Set context options. 327 // Set context options.
328 Driver.setAnalysisContextOptions(resourceProvider, context, options, 328 Driver.setAnalysisContextOptions(resourceProvider, context, options);
329 (AnalysisOptionsImpl contextOptions) {
330 if (options.buildSummaryOnlyDiet) {
331 contextOptions.analyzeFunctionBodies = false;
332 }
333 });
334 329
335 if (!options.buildSummaryOnly) { 330 if (!options.buildSummaryOnly) {
336 // Configure using summaries. 331 // Configure using summaries.
337 context.typeProvider = sdk.context.typeProvider; 332 context.typeProvider = sdk.context.typeProvider;
338 context.resultProvider = 333 context.resultProvider =
339 new InputPackagesResultProvider(context, summaryDataStore); 334 new InputPackagesResultProvider(context, summaryDataStore);
340 } 335 }
341 } 336 }
342 337
343 /** 338 /**
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 * Build the inverse mapping of [uriToSourceMap]. 471 * Build the inverse mapping of [uriToSourceMap].
477 */ 472 */
478 static Map<String, Uri> _computePathToUriMap(Map<Uri, File> uriToSourceMap) { 473 static Map<String, Uri> _computePathToUriMap(Map<Uri, File> uriToSourceMap) {
479 Map<String, Uri> pathToUriMap = <String, Uri>{}; 474 Map<String, Uri> pathToUriMap = <String, Uri>{};
480 uriToSourceMap.forEach((Uri uri, File file) { 475 uriToSourceMap.forEach((Uri uri, File file) {
481 pathToUriMap[file.path] = uri; 476 pathToUriMap[file.path] = uri;
482 }); 477 });
483 return pathToUriMap; 478 return pathToUriMap;
484 } 479 }
485 } 480 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/driver.dart » ('j') | pkg/analyzer_cli/lib/src/driver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698