Chromium Code Reviews| Index: pkg/analyzer/lib/src/generated/sdk_io.dart |
| diff --git a/pkg/analyzer/lib/src/generated/sdk_io.dart b/pkg/analyzer/lib/src/generated/sdk_io.dart |
| index 8cdb8f2ee7b430c9063ee734e8642350018ed651..4d21f44fd425d096509fbe2742c130c55a50c2c4 100644 |
| --- a/pkg/analyzer/lib/src/generated/sdk_io.dart |
| +++ b/pkg/analyzer/lib/src/generated/sdk_io.dart |
| @@ -207,6 +207,11 @@ class DirectoryBasedDartSdk implements DartSdk { |
| JavaFile _libraryDirectory; |
| /** |
| + * The flag that specifies whether SDK summary should be used. |
| + */ |
| + bool _useSummary = false; |
|
Brian Wilkerson
2016/02/09 20:41:07
I don't understand what the value of this flag is
|
| + |
| + /** |
| * The revision number of this SDK, or `"0"` if the revision number cannot be |
| * discovered. |
| */ |
| @@ -259,10 +264,12 @@ class DirectoryBasedDartSdk implements DartSdk { |
| SourceFactory factory = new SourceFactory([new DartUriResolver(this)]); |
| _analysisContext.sourceFactory = factory; |
| // Try to use summaries. |
| - SdkBundle sdkBundle = _getSummarySdkBundle(); |
| - if (sdkBundle != null) { |
| - _analysisContext.resultProvider = |
| - new SdkSummaryResultProvider(_analysisContext, sdkBundle); |
| + if (_useSummary) { |
| + SdkBundle sdkBundle = _getSummarySdkBundle(); |
| + if (sdkBundle != null) { |
| + _analysisContext.resultProvider = |
| + new SdkSummaryResultProvider(_analysisContext, sdkBundle); |
| + } |
| } |
| } |
| return _analysisContext; |
| @@ -390,6 +397,17 @@ class DirectoryBasedDartSdk implements DartSdk { |
| List<String> get uris => _libraryMap.uris; |
| /** |
| + * Specify whether SDK summary should be used. This property can only be set |
| + * before [context] was invoked. |
|
Paul Berry
2016/02/09 20:36:08
s/was/is/
|
| + */ |
| + void set useSummary(bool use) { |
| + if (_analysisContext != null) { |
| + throw new StateError('SDK analysis context has been already created.'); |
| + } |
| + _useSummary = use; |
| + } |
| + |
| + /** |
| * Return the name of the file containing the VM executable. |
| */ |
| String get vmBinaryName { |