| 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/instrumentation/instrumentation.dart'; | 10 import 'package:analyzer/instrumentation/instrumentation.dart'; |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 void set analysisOptions(AnalysisOptions options) { | 240 void set analysisOptions(AnalysisOptions options) { |
| 241 bool needsRecompute = this._options.analyzeFunctionBodiesPredicate != | 241 bool needsRecompute = this._options.analyzeFunctionBodiesPredicate != |
| 242 options.analyzeFunctionBodiesPredicate || | 242 options.analyzeFunctionBodiesPredicate || |
| 243 this._options.generateImplicitErrors != | 243 this._options.generateImplicitErrors != |
| 244 options.generateImplicitErrors || | 244 options.generateImplicitErrors || |
| 245 this._options.generateSdkErrors != options.generateSdkErrors || | 245 this._options.generateSdkErrors != options.generateSdkErrors || |
| 246 this._options.dart2jsHint != options.dart2jsHint || | 246 this._options.dart2jsHint != options.dart2jsHint || |
| 247 (this._options.hint && !options.hint) || | 247 (this._options.hint && !options.hint) || |
| 248 (this._options.lint && !options.lint) || | 248 (this._options.lint && !options.lint) || |
| 249 this._options.preserveComments != options.preserveComments || | 249 this._options.preserveComments != options.preserveComments || |
| 250 this._options.enableStrictCallChecks != options.enableStrictCallChecks; | 250 this._options.enableStrictCallChecks != |
| 251 options.enableStrictCallChecks || |
| 252 this._options.enableSuperMixins != options.enableSuperMixins; |
| 251 int cacheSize = options.cacheSize; | 253 int cacheSize = options.cacheSize; |
| 252 if (this._options.cacheSize != cacheSize) { | 254 if (this._options.cacheSize != cacheSize) { |
| 253 this._options.cacheSize = cacheSize; | 255 this._options.cacheSize = cacheSize; |
| 254 } | 256 } |
| 255 this._options.analyzeFunctionBodiesPredicate = | 257 this._options.analyzeFunctionBodiesPredicate = |
| 256 options.analyzeFunctionBodiesPredicate; | 258 options.analyzeFunctionBodiesPredicate; |
| 257 this._options.generateImplicitErrors = options.generateImplicitErrors; | 259 this._options.generateImplicitErrors = options.generateImplicitErrors; |
| 258 this._options.generateSdkErrors = options.generateSdkErrors; | 260 this._options.generateSdkErrors = options.generateSdkErrors; |
| 259 this._options.dart2jsHint = options.dart2jsHint; | 261 this._options.dart2jsHint = options.dart2jsHint; |
| 260 this._options.enableStrictCallChecks = options.enableStrictCallChecks; | 262 this._options.enableStrictCallChecks = options.enableStrictCallChecks; |
| 263 this._options.enableSuperMixins = options.enableSuperMixins; |
| 261 this._options.hint = options.hint; | 264 this._options.hint = options.hint; |
| 262 this._options.incremental = options.incremental; | 265 this._options.incremental = options.incremental; |
| 263 this._options.incrementalApi = options.incrementalApi; | 266 this._options.incrementalApi = options.incrementalApi; |
| 264 this._options.incrementalValidation = options.incrementalValidation; | 267 this._options.incrementalValidation = options.incrementalValidation; |
| 265 this._options.lint = options.lint; | 268 this._options.lint = options.lint; |
| 266 this._options.preserveComments = options.preserveComments; | 269 this._options.preserveComments = options.preserveComments; |
| 267 if (needsRecompute) { | 270 if (needsRecompute) { |
| 268 dartWorkManager.onAnalysisOptionsChanged(); | 271 dartWorkManager.onAnalysisOptionsChanged(); |
| 269 htmlWorkManager.onAnalysisOptionsChanged(); | 272 htmlWorkManager.onAnalysisOptionsChanged(); |
| 270 } | 273 } |
| (...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2054 new PendingFuture<T>(_context, target, computeValue); | 2057 new PendingFuture<T>(_context, target, computeValue); |
| 2055 if (!pendingFuture.evaluate(entry)) { | 2058 if (!pendingFuture.evaluate(entry)) { |
| 2056 _context._pendingFutureTargets | 2059 _context._pendingFutureTargets |
| 2057 .putIfAbsent(target, () => <PendingFuture>[]) | 2060 .putIfAbsent(target, () => <PendingFuture>[]) |
| 2058 .add(pendingFuture); | 2061 .add(pendingFuture); |
| 2059 scheduleComputation(); | 2062 scheduleComputation(); |
| 2060 } | 2063 } |
| 2061 return pendingFuture.future; | 2064 return pendingFuture.future; |
| 2062 } | 2065 } |
| 2063 } | 2066 } |
| OLD | NEW |