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/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 this._options.generateSdkErrors != options.generateSdkErrors || | 264 this._options.generateSdkErrors != options.generateSdkErrors || |
265 this._options.dart2jsHint != options.dart2jsHint || | 265 this._options.dart2jsHint != options.dart2jsHint || |
266 (this._options.hint && !options.hint) || | 266 (this._options.hint && !options.hint) || |
267 (this._options.lint && !options.lint) || | 267 (this._options.lint && !options.lint) || |
268 this._options.preserveComments != options.preserveComments || | 268 this._options.preserveComments != options.preserveComments || |
269 this._options.strongMode != options.strongMode || | 269 this._options.strongMode != options.strongMode || |
270 this._options.enableAssertMessage != options.enableAssertMessage || | 270 this._options.enableAssertMessage != options.enableAssertMessage || |
271 ((options is AnalysisOptionsImpl) | 271 ((options is AnalysisOptionsImpl) |
272 ? this._options.strongModeHints != options.strongModeHints | 272 ? this._options.strongModeHints != options.strongModeHints |
273 : false) || | 273 : false) || |
| 274 ((options is AnalysisOptionsImpl) |
| 275 ? this._options.implicitCasts != options.implicitCasts |
| 276 : false) || |
274 this._options.enableStrictCallChecks != | 277 this._options.enableStrictCallChecks != |
275 options.enableStrictCallChecks || | 278 options.enableStrictCallChecks || |
276 this._options.enableGenericMethods != options.enableGenericMethods || | 279 this._options.enableGenericMethods != options.enableGenericMethods || |
277 this._options.enableAsync != options.enableAsync || | 280 this._options.enableAsync != options.enableAsync || |
278 this._options.enableSuperMixins != options.enableSuperMixins; | 281 this._options.enableSuperMixins != options.enableSuperMixins; |
279 int cacheSize = options.cacheSize; | 282 int cacheSize = options.cacheSize; |
280 if (this._options.cacheSize != cacheSize) { | 283 if (this._options.cacheSize != cacheSize) { |
281 this._options.cacheSize = cacheSize; | 284 this._options.cacheSize = cacheSize; |
282 } | 285 } |
283 this._options.analyzeFunctionBodiesPredicate = | 286 this._options.analyzeFunctionBodiesPredicate = |
284 options.analyzeFunctionBodiesPredicate; | 287 options.analyzeFunctionBodiesPredicate; |
285 this._options.generateImplicitErrors = options.generateImplicitErrors; | 288 this._options.generateImplicitErrors = options.generateImplicitErrors; |
286 this._options.generateSdkErrors = options.generateSdkErrors; | 289 this._options.generateSdkErrors = options.generateSdkErrors; |
287 this._options.dart2jsHint = options.dart2jsHint; | 290 this._options.dart2jsHint = options.dart2jsHint; |
288 this._options.enableGenericMethods = options.enableGenericMethods; | 291 this._options.enableGenericMethods = options.enableGenericMethods; |
289 this._options.enableAssertMessage = options.enableAssertMessage; | 292 this._options.enableAssertMessage = options.enableAssertMessage; |
290 this._options.enableStrictCallChecks = options.enableStrictCallChecks; | 293 this._options.enableStrictCallChecks = options.enableStrictCallChecks; |
291 this._options.enableAsync = options.enableAsync; | 294 this._options.enableAsync = options.enableAsync; |
292 this._options.enableSuperMixins = options.enableSuperMixins; | 295 this._options.enableSuperMixins = options.enableSuperMixins; |
293 this._options.enableTiming = options.enableTiming; | 296 this._options.enableTiming = options.enableTiming; |
294 this._options.hint = options.hint; | 297 this._options.hint = options.hint; |
295 this._options.incremental = options.incremental; | 298 this._options.incremental = options.incremental; |
296 this._options.incrementalApi = options.incrementalApi; | 299 this._options.incrementalApi = options.incrementalApi; |
297 this._options.incrementalValidation = options.incrementalValidation; | 300 this._options.incrementalValidation = options.incrementalValidation; |
298 this._options.lint = options.lint; | 301 this._options.lint = options.lint; |
299 this._options.preserveComments = options.preserveComments; | 302 this._options.preserveComments = options.preserveComments; |
300 this._options.strongMode = options.strongMode; | 303 this._options.strongMode = options.strongMode; |
301 if (options is AnalysisOptionsImpl) { | 304 if (options is AnalysisOptionsImpl) { |
302 this._options.strongModeHints = options.strongModeHints; | 305 this._options.strongModeHints = options.strongModeHints; |
| 306 this._options.implicitCasts = options.implicitCasts; |
303 } | 307 } |
304 if (needsRecompute) { | 308 if (needsRecompute) { |
305 for (WorkManager workManager in workManagers) { | 309 for (WorkManager workManager in workManagers) { |
306 workManager.onAnalysisOptionsChanged(); | 310 workManager.onAnalysisOptionsChanged(); |
307 } | 311 } |
308 } | 312 } |
309 } | 313 } |
310 | 314 |
311 @override | 315 @override |
312 void set analysisPriorityOrder(List<Source> sources) { | 316 void set analysisPriorityOrder(List<Source> sources) { |
(...skipping 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2216 } | 2220 } |
2217 DartSdk sdk = factory.dartSdk; | 2221 DartSdk sdk = factory.dartSdk; |
2218 if (sdk == null) { | 2222 if (sdk == null) { |
2219 throw new IllegalArgumentException( | 2223 throw new IllegalArgumentException( |
2220 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2224 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
2221 } | 2225 } |
2222 return new AnalysisCache( | 2226 return new AnalysisCache( |
2223 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 2227 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
2224 } | 2228 } |
2225 } | 2229 } |
OLD | NEW |