| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 this._options.preserveComments != options.preserveComments || | 262 this._options.preserveComments != options.preserveComments || |
| 263 this._options.strongMode != options.strongMode || | 263 this._options.strongMode != options.strongMode || |
| 264 this._options.enableAssertMessage != options.enableAssertMessage || | 264 this._options.enableAssertMessage != options.enableAssertMessage || |
| 265 ((options is AnalysisOptionsImpl) | 265 ((options is AnalysisOptionsImpl) |
| 266 ? this._options.strongModeHints != options.strongModeHints | 266 ? this._options.strongModeHints != options.strongModeHints |
| 267 : false) || | 267 : false) || |
| 268 this._options.enableStrictCallChecks != | 268 this._options.enableStrictCallChecks != |
| 269 options.enableStrictCallChecks || | 269 options.enableStrictCallChecks || |
| 270 this._options.enableGenericMethods != options.enableGenericMethods || | 270 this._options.enableGenericMethods != options.enableGenericMethods || |
| 271 this._options.enableAsync != options.enableAsync || | 271 this._options.enableAsync != options.enableAsync || |
| 272 this._options.enableConditionalDirectives != | |
| 273 options.enableConditionalDirectives || | |
| 274 this._options.enableSuperMixins != options.enableSuperMixins; | 272 this._options.enableSuperMixins != options.enableSuperMixins; |
| 275 int cacheSize = options.cacheSize; | 273 int cacheSize = options.cacheSize; |
| 276 if (this._options.cacheSize != cacheSize) { | 274 if (this._options.cacheSize != cacheSize) { |
| 277 this._options.cacheSize = cacheSize; | 275 this._options.cacheSize = cacheSize; |
| 278 } | 276 } |
| 279 this._options.analyzeFunctionBodiesPredicate = | 277 this._options.analyzeFunctionBodiesPredicate = |
| 280 options.analyzeFunctionBodiesPredicate; | 278 options.analyzeFunctionBodiesPredicate; |
| 281 this._options.generateImplicitErrors = options.generateImplicitErrors; | 279 this._options.generateImplicitErrors = options.generateImplicitErrors; |
| 282 this._options.generateSdkErrors = options.generateSdkErrors; | 280 this._options.generateSdkErrors = options.generateSdkErrors; |
| 283 this._options.dart2jsHint = options.dart2jsHint; | 281 this._options.dart2jsHint = options.dart2jsHint; |
| 284 this._options.enableGenericMethods = options.enableGenericMethods; | 282 this._options.enableGenericMethods = options.enableGenericMethods; |
| 285 this._options.enableAssertMessage = options.enableAssertMessage; | 283 this._options.enableAssertMessage = options.enableAssertMessage; |
| 286 this._options.enableStrictCallChecks = options.enableStrictCallChecks; | 284 this._options.enableStrictCallChecks = options.enableStrictCallChecks; |
| 287 this._options.enableAsync = options.enableAsync; | 285 this._options.enableAsync = options.enableAsync; |
| 288 this._options.enableConditionalDirectives = | |
| 289 options.enableConditionalDirectives; | |
| 290 this._options.enableSuperMixins = options.enableSuperMixins; | 286 this._options.enableSuperMixins = options.enableSuperMixins; |
| 291 this._options.enableTiming = options.enableTiming; | 287 this._options.enableTiming = options.enableTiming; |
| 292 this._options.hint = options.hint; | 288 this._options.hint = options.hint; |
| 293 this._options.incremental = options.incremental; | 289 this._options.incremental = options.incremental; |
| 294 this._options.incrementalApi = options.incrementalApi; | 290 this._options.incrementalApi = options.incrementalApi; |
| 295 this._options.incrementalValidation = options.incrementalValidation; | 291 this._options.incrementalValidation = options.incrementalValidation; |
| 296 this._options.lint = options.lint; | 292 this._options.lint = options.lint; |
| 297 this._options.preserveComments = options.preserveComments; | 293 this._options.preserveComments = options.preserveComments; |
| 298 this._options.strongMode = options.strongMode; | 294 this._options.strongMode = options.strongMode; |
| 299 if (options is AnalysisOptionsImpl) { | 295 if (options is AnalysisOptionsImpl) { |
| (...skipping 1897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2197 } | 2193 } |
| 2198 DartSdk sdk = factory.dartSdk; | 2194 DartSdk sdk = factory.dartSdk; |
| 2199 if (sdk == null) { | 2195 if (sdk == null) { |
| 2200 throw new IllegalArgumentException( | 2196 throw new IllegalArgumentException( |
| 2201 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2197 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
| 2202 } | 2198 } |
| 2203 return new AnalysisCache( | 2199 return new AnalysisCache( |
| 2204 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 2200 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
| 2205 } | 2201 } |
| 2206 } | 2202 } |
| OLD | NEW |