OLD | NEW |
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:core' hide Resource; | 7 import 'dart:core' hide Resource; |
8 import 'dart:io' as io; | 8 import 'dart:io' as io; |
9 | 9 |
10 import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit; | 10 import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit; |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 return maxSeverity; | 238 return maxSeverity; |
239 } | 239 } |
240 | 240 |
241 void _createContext() { | 241 void _createContext() { |
242 // Read the summaries. | 242 // Read the summaries. |
243 summaryDataStore = new SummaryDataStore(options.buildSummaryInputs); | 243 summaryDataStore = new SummaryDataStore(options.buildSummaryInputs); |
244 | 244 |
245 DartSdk sdk; | 245 DartSdk sdk; |
246 PackageBundle sdkBundle; | 246 PackageBundle sdkBundle; |
247 if (options.dartSdkSummaryPath != null) { | 247 if (options.dartSdkSummaryPath != null) { |
248 SummaryBasedDartSdk summarySdk = | 248 SummaryBasedDartSdk summarySdk = new SummaryBasedDartSdk( |
249 new SummaryBasedDartSdk(options.dartSdkSummaryPath); | 249 options.dartSdkSummaryPath, options.strongMode); |
250 sdk = summarySdk; | 250 sdk = summarySdk; |
251 sdkBundle = summarySdk.bundle; | 251 sdkBundle = summarySdk.bundle; |
252 } else { | 252 } else { |
253 DirectoryBasedDartSdk directorySdk = | 253 DirectoryBasedDartSdk directorySdk = |
254 new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath)); | 254 new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath)); |
255 directorySdk.analysisOptions = | 255 directorySdk.analysisOptions = |
256 Driver.createAnalysisOptionsForCommandLineOptions(options); | 256 Driver.createAnalysisOptionsForCommandLineOptions(options); |
257 directorySdk.useSummary = !options.buildSummaryOnlyAst; | 257 directorySdk.useSummary = !options.buildSummaryOnlyAst; |
258 sdk = directorySdk; | 258 sdk = directorySdk; |
259 sdkBundle = directorySdk.getSummarySdkBundle(); | 259 sdkBundle = directorySdk.getSummarySdkBundle(); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 'Illegal input file (must be "\$uri|\$path"): $sourceFile'); | 370 'Illegal input file (must be "\$uri|\$path"): $sourceFile'); |
371 return null; | 371 return null; |
372 } | 372 } |
373 Uri uri = Uri.parse(sourceFile.substring(0, pipeIndex)); | 373 Uri uri = Uri.parse(sourceFile.substring(0, pipeIndex)); |
374 String path = sourceFile.substring(pipeIndex + 1); | 374 String path = sourceFile.substring(pipeIndex + 1); |
375 uriToFileMap[uri] = new JavaFile(path); | 375 uriToFileMap[uri] = new JavaFile(path); |
376 } | 376 } |
377 return uriToFileMap; | 377 return uriToFileMap; |
378 } | 378 } |
379 } | 379 } |
OLD | NEW |