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.src.context.context; | 5 library analyzer.src.context.context; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 | 9 |
10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 (this._options.lint && !options.lint) || | 246 (this._options.lint && !options.lint) || |
247 this._options.preserveComments != options.preserveComments || | 247 this._options.preserveComments != options.preserveComments || |
248 this._options.strongMode != options.strongMode || | 248 this._options.strongMode != options.strongMode || |
249 this._options.enableAssertMessage != options.enableAssertMessage || | 249 this._options.enableAssertMessage != options.enableAssertMessage || |
250 ((options is AnalysisOptionsImpl) | 250 ((options is AnalysisOptionsImpl) |
251 ? this._options.strongModeHints != options.strongModeHints | 251 ? this._options.strongModeHints != options.strongModeHints |
252 : false) || | 252 : false) || |
253 this._options.enableStrictCallChecks != | 253 this._options.enableStrictCallChecks != |
254 options.enableStrictCallChecks || | 254 options.enableStrictCallChecks || |
255 this._options.enableGenericMethods != options.enableGenericMethods || | 255 this._options.enableGenericMethods != options.enableGenericMethods || |
| 256 this._options.enableAsync != options.enableAsync || |
256 this._options.enableSuperMixins != options.enableSuperMixins; | 257 this._options.enableSuperMixins != options.enableSuperMixins; |
257 int cacheSize = options.cacheSize; | 258 int cacheSize = options.cacheSize; |
258 if (this._options.cacheSize != cacheSize) { | 259 if (this._options.cacheSize != cacheSize) { |
259 this._options.cacheSize = cacheSize; | 260 this._options.cacheSize = cacheSize; |
260 } | 261 } |
261 this._options.analyzeFunctionBodiesPredicate = | 262 this._options.analyzeFunctionBodiesPredicate = |
262 options.analyzeFunctionBodiesPredicate; | 263 options.analyzeFunctionBodiesPredicate; |
263 this._options.generateImplicitErrors = options.generateImplicitErrors; | 264 this._options.generateImplicitErrors = options.generateImplicitErrors; |
264 this._options.generateSdkErrors = options.generateSdkErrors; | 265 this._options.generateSdkErrors = options.generateSdkErrors; |
265 this._options.dart2jsHint = options.dart2jsHint; | 266 this._options.dart2jsHint = options.dart2jsHint; |
266 this._options.enableGenericMethods = options.enableGenericMethods; | 267 this._options.enableGenericMethods = options.enableGenericMethods; |
267 this._options.enableAssertMessage = options.enableAssertMessage; | 268 this._options.enableAssertMessage = options.enableAssertMessage; |
268 this._options.enableStrictCallChecks = options.enableStrictCallChecks; | 269 this._options.enableStrictCallChecks = options.enableStrictCallChecks; |
| 270 this._options.enableAsync = options.enableAsync; |
269 this._options.enableSuperMixins = options.enableSuperMixins; | 271 this._options.enableSuperMixins = options.enableSuperMixins; |
270 this._options.hint = options.hint; | 272 this._options.hint = options.hint; |
271 this._options.incremental = options.incremental; | 273 this._options.incremental = options.incremental; |
272 this._options.incrementalApi = options.incrementalApi; | 274 this._options.incrementalApi = options.incrementalApi; |
273 this._options.incrementalValidation = options.incrementalValidation; | 275 this._options.incrementalValidation = options.incrementalValidation; |
274 this._options.lint = options.lint; | 276 this._options.lint = options.lint; |
275 this._options.preserveComments = options.preserveComments; | 277 this._options.preserveComments = options.preserveComments; |
276 this._options.strongMode = options.strongMode; | 278 this._options.strongMode = options.strongMode; |
277 if (options is AnalysisOptionsImpl) { | 279 if (options is AnalysisOptionsImpl) { |
278 this._options.strongModeHints = options.strongModeHints; | 280 this._options.strongModeHints = options.strongModeHints; |
(...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2029 } | 2031 } |
2030 DartSdk sdk = factory.dartSdk; | 2032 DartSdk sdk = factory.dartSdk; |
2031 if (sdk == null) { | 2033 if (sdk == null) { |
2032 throw new IllegalArgumentException( | 2034 throw new IllegalArgumentException( |
2033 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2035 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
2034 } | 2036 } |
2035 return new AnalysisCache( | 2037 return new AnalysisCache( |
2036 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 2038 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
2037 } | 2039 } |
2038 } | 2040 } |
OLD | NEW |