Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: pkg/analyzer/lib/src/context/context.dart

Issue 2361203004: Issue 27358. Reset AnalysisContext 'sourceFactory' and 'typeSystem' on analysis options change. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 this._options.enableInitializingFormalAccess = 322 this._options.enableInitializingFormalAccess =
323 options.enableInitializingFormalAccess; 323 options.enableInitializingFormalAccess;
324 this._options.enableSuperMixins = options.enableSuperMixins; 324 this._options.enableSuperMixins = options.enableSuperMixins;
325 this._options.enableTiming = options.enableTiming; 325 this._options.enableTiming = options.enableTiming;
326 this._options.hint = options.hint; 326 this._options.hint = options.hint;
327 this._options.incremental = options.incremental; 327 this._options.incremental = options.incremental;
328 this._options.incrementalApi = options.incrementalApi; 328 this._options.incrementalApi = options.incrementalApi;
329 this._options.incrementalValidation = options.incrementalValidation; 329 this._options.incrementalValidation = options.incrementalValidation;
330 this._options.lint = options.lint; 330 this._options.lint = options.lint;
331 this._options.preserveComments = options.preserveComments; 331 this._options.preserveComments = options.preserveComments;
332 if (this._options.strongMode != options.strongMode) {
333 _typeSystem = null;
334 }
332 this._options.strongMode = options.strongMode; 335 this._options.strongMode = options.strongMode;
333 this._options.trackCacheDependencies = options.trackCacheDependencies; 336 this._options.trackCacheDependencies = options.trackCacheDependencies;
334 this._options.finerGrainedInvalidation = options.finerGrainedInvalidation; 337 this._options.finerGrainedInvalidation = options.finerGrainedInvalidation;
335 if (options is AnalysisOptionsImpl) { 338 if (options is AnalysisOptionsImpl) {
336 this._options.strongModeHints = options.strongModeHints; 339 this._options.strongModeHints = options.strongModeHints;
337 this._options.implicitCasts = options.implicitCasts; 340 this._options.implicitCasts = options.implicitCasts;
338 this._options.nonnullableTypes = options.nonnullableTypes; 341 this._options.nonnullableTypes = options.nonnullableTypes;
339 this._options.implicitDynamic = options.implicitDynamic; 342 this._options.implicitDynamic = options.implicitDynamic;
340 } 343 }
341 if (needsRecompute) { 344 if (needsRecompute) {
(...skipping 1883 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 } 2228 }
2226 DartSdk sdk = factory.dartSdk; 2229 DartSdk sdk = factory.dartSdk;
2227 if (sdk == null) { 2230 if (sdk == null) {
2228 throw new ArgumentError( 2231 throw new ArgumentError(
2229 "The source factory for an SDK analysis context must have a DartUriRes olver"); 2232 "The source factory for an SDK analysis context must have a DartUriRes olver");
2230 } 2233 }
2231 return new AnalysisCache( 2234 return new AnalysisCache(
2232 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); 2235 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
2233 } 2236 }
2234 } 2237 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698