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

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

Issue 1239513005: Switch on null-aware operators by default in analyzer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/instrumentation/instrumentation.dart'; 10 import 'package:analyzer/instrumentation/instrumentation.dart';
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 void set analysisOptions(AnalysisOptions options) { 232 void set analysisOptions(AnalysisOptions options) {
233 bool needsRecompute = this._options.analyzeFunctionBodiesPredicate != 233 bool needsRecompute = this._options.analyzeFunctionBodiesPredicate !=
234 options.analyzeFunctionBodiesPredicate || 234 options.analyzeFunctionBodiesPredicate ||
235 this._options.generateImplicitErrors != 235 this._options.generateImplicitErrors !=
236 options.generateImplicitErrors || 236 options.generateImplicitErrors ||
237 this._options.generateSdkErrors != options.generateSdkErrors || 237 this._options.generateSdkErrors != options.generateSdkErrors ||
238 this._options.dart2jsHint != options.dart2jsHint || 238 this._options.dart2jsHint != options.dart2jsHint ||
239 (this._options.hint && !options.hint) || 239 (this._options.hint && !options.hint) ||
240 (this._options.lint && !options.lint) || 240 (this._options.lint && !options.lint) ||
241 this._options.preserveComments != options.preserveComments || 241 this._options.preserveComments != options.preserveComments ||
242 this._options.enableNullAwareOperators !=
243 options.enableNullAwareOperators ||
244 this._options.enableStrictCallChecks != options.enableStrictCallChecks; 242 this._options.enableStrictCallChecks != options.enableStrictCallChecks;
245 int cacheSize = options.cacheSize; 243 int cacheSize = options.cacheSize;
246 if (this._options.cacheSize != cacheSize) { 244 if (this._options.cacheSize != cacheSize) {
247 this._options.cacheSize = cacheSize; 245 this._options.cacheSize = cacheSize;
248 } 246 }
249 this._options.analyzeFunctionBodiesPredicate = 247 this._options.analyzeFunctionBodiesPredicate =
250 options.analyzeFunctionBodiesPredicate; 248 options.analyzeFunctionBodiesPredicate;
251 this._options.generateImplicitErrors = options.generateImplicitErrors; 249 this._options.generateImplicitErrors = options.generateImplicitErrors;
252 this._options.generateSdkErrors = options.generateSdkErrors; 250 this._options.generateSdkErrors = options.generateSdkErrors;
253 this._options.dart2jsHint = options.dart2jsHint; 251 this._options.dart2jsHint = options.dart2jsHint;
254 this._options.enableNullAwareOperators = options.enableNullAwareOperators;
255 this._options.enableStrictCallChecks = options.enableStrictCallChecks; 252 this._options.enableStrictCallChecks = options.enableStrictCallChecks;
256 this._options.hint = options.hint; 253 this._options.hint = options.hint;
257 this._options.incremental = options.incremental; 254 this._options.incremental = options.incremental;
258 this._options.incrementalApi = options.incrementalApi; 255 this._options.incrementalApi = options.incrementalApi;
259 this._options.incrementalValidation = options.incrementalValidation; 256 this._options.incrementalValidation = options.incrementalValidation;
260 this._options.lint = options.lint; 257 this._options.lint = options.lint;
261 this._options.preserveComments = options.preserveComments; 258 this._options.preserveComments = options.preserveComments;
262 if (needsRecompute) { 259 if (needsRecompute) {
263 dartWorkManager.onAnalysisOptionsChanged(); 260 dartWorkManager.onAnalysisOptionsChanged();
264 htmlWorkManager.onAnalysisOptionsChanged(); 261 htmlWorkManager.onAnalysisOptionsChanged();
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after
2025 new PendingFuture<T>(_context, target, computeValue); 2022 new PendingFuture<T>(_context, target, computeValue);
2026 if (!pendingFuture.evaluate(entry)) { 2023 if (!pendingFuture.evaluate(entry)) {
2027 _context._pendingFutureTargets 2024 _context._pendingFutureTargets
2028 .putIfAbsent(target, () => <PendingFuture>[]) 2025 .putIfAbsent(target, () => <PendingFuture>[])
2029 .add(pendingFuture); 2026 .add(pendingFuture);
2030 scheduleComputation(); 2027 scheduleComputation();
2031 } 2028 }
2032 return pendingFuture.future; 2029 return pendingFuture.future;
2033 } 2030 }
2034 } 2031 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698