| 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.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' as io; | 9 import 'dart:io' as io; |
| 10 | 10 |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 if (options.strongMode != _previousOptions.strongMode) { | 304 if (options.strongMode != _previousOptions.strongMode) { |
| 305 return false; | 305 return false; |
| 306 } | 306 } |
| 307 if (options.enableSuperMixins != _previousOptions.enableSuperMixins) { | 307 if (options.enableSuperMixins != _previousOptions.enableSuperMixins) { |
| 308 return false; | 308 return false; |
| 309 } | 309 } |
| 310 if (!_equalLists( | 310 if (!_equalLists( |
| 311 options.buildSummaryInputs, _previousOptions.buildSummaryInputs)) { | 311 options.buildSummaryInputs, _previousOptions.buildSummaryInputs)) { |
| 312 return false; | 312 return false; |
| 313 } | 313 } |
| 314 if (options.disableCacheFlushing != _previousOptions.disableCacheFlushing) { |
| 315 return false; |
| 316 } |
| 314 return true; | 317 return true; |
| 315 } | 318 } |
| 316 | 319 |
| 317 /// Decide on the appropriate policy for which files need to be fully parsed | 320 /// Decide on the appropriate policy for which files need to be fully parsed |
| 318 /// and which files need to be diet parsed, based on [options], and return an | 321 /// and which files need to be diet parsed, based on [options], and return an |
| 319 /// [AnalyzeFunctionBodiesPredicate] that implements this policy. | 322 /// [AnalyzeFunctionBodiesPredicate] that implements this policy. |
| 320 AnalyzeFunctionBodiesPredicate _chooseDietParsingPolicy( | 323 AnalyzeFunctionBodiesPredicate _chooseDietParsingPolicy( |
| 321 CommandLineOptions options) { | 324 CommandLineOptions options) { |
| 322 if (options.shouldBatch) { | 325 if (options.shouldBatch) { |
| 323 // As analyzer is currently implemented, once a file has been diet | 326 // As analyzer is currently implemented, once a file has been diet |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 dartSdk.analysisOptions = context.analysisOptions; | 659 dartSdk.analysisOptions = context.analysisOptions; |
| 657 sdk = dartSdk; | 660 sdk = dartSdk; |
| 658 } | 661 } |
| 659 } | 662 } |
| 660 } | 663 } |
| 661 | 664 |
| 662 static AnalysisOptionsImpl createAnalysisOptionsForCommandLineOptions( | 665 static AnalysisOptionsImpl createAnalysisOptionsForCommandLineOptions( |
| 663 CommandLineOptions options) { | 666 CommandLineOptions options) { |
| 664 AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl(); | 667 AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl(); |
| 665 contextOptions.trackCacheDependencies = false; | 668 contextOptions.trackCacheDependencies = false; |
| 669 contextOptions.disableCacheFlushing = options.disableCacheFlushing; |
| 666 contextOptions.hint = !options.disableHints; | 670 contextOptions.hint = !options.disableHints; |
| 667 contextOptions.enableInitializingFormalAccess = | 671 contextOptions.enableInitializingFormalAccess = |
| 668 options.enableInitializingFormalAccess; | 672 options.enableInitializingFormalAccess; |
| 669 contextOptions.enableStrictCallChecks = options.enableStrictCallChecks; | 673 contextOptions.enableStrictCallChecks = options.enableStrictCallChecks; |
| 670 contextOptions.enableSuperMixins = options.enableSuperMixins; | 674 contextOptions.enableSuperMixins = options.enableSuperMixins; |
| 671 contextOptions.generateImplicitErrors = options.showPackageWarnings; | 675 contextOptions.generateImplicitErrors = options.showPackageWarnings; |
| 672 contextOptions.generateSdkErrors = options.showSdkWarnings; | 676 contextOptions.generateSdkErrors = options.showSdkWarnings; |
| 673 contextOptions.lint = options.lints; | 677 contextOptions.lint = options.lints; |
| 674 contextOptions.strongMode = options.strongMode; | 678 contextOptions.strongMode = options.strongMode; |
| 675 contextOptions.implicitCasts = options.implicitCasts; | 679 contextOptions.implicitCasts = options.implicitCasts; |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 for (var package in packages) { | 877 for (var package in packages) { |
| 874 var packageName = path.basename(package.path); | 878 var packageName = path.basename(package.path); |
| 875 var realPath = package.resolveSymbolicLinksSync(); | 879 var realPath = package.resolveSymbolicLinksSync(); |
| 876 result[packageName] = [ | 880 result[packageName] = [ |
| 877 PhysicalResourceProvider.INSTANCE.getFolder(realPath) | 881 PhysicalResourceProvider.INSTANCE.getFolder(realPath) |
| 878 ]; | 882 ]; |
| 879 } | 883 } |
| 880 return result; | 884 return result; |
| 881 } | 885 } |
| 882 } | 886 } |
| OLD | NEW |