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

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

Issue 1808123005: First batch of changes to make analyzer package strong mode error free (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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.cache; 5 library analyzer.src.context.cache;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/src/dart/element/element.dart' 10 import 'package:analyzer/src/dart/element/element.dart'
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 * the default value for the result if this entry does not have a valid value. 398 * the default value for the result if this entry does not have a valid value.
399 */ 399 */
400 dynamic/*=V*/ getValue/*<V>*/(ResultDescriptor/*<V>*/ descriptor) { 400 dynamic/*=V*/ getValue/*<V>*/(ResultDescriptor/*<V>*/ descriptor) {
401 ResultData data = _resultMap[descriptor]; 401 ResultData data = _resultMap[descriptor];
402 if (data == null) { 402 if (data == null) {
403 return descriptor.defaultValue; 403 return descriptor.defaultValue;
404 } 404 }
405 if (_partition != null) { 405 if (_partition != null) {
406 _partition.resultAccessed(target, descriptor); 406 _partition.resultAccessed(target, descriptor);
407 } 407 }
408 return data.value; 408 return data.value as Object/*=V*/;
409 } 409 }
410 410
411 /** 411 /**
412 * Return `true` if the state of any data value is [CacheState.ERROR]. 412 * Return `true` if the state of any data value is [CacheState.ERROR].
413 */ 413 */
414 bool hasErrorState() { 414 bool hasErrorState() {
415 for (ResultData data in _resultMap.values) { 415 for (ResultData data in _resultMap.values) {
416 if (data.state == CacheState.ERROR) { 416 if (data.state == CacheState.ERROR) {
417 return true; 417 return true;
418 } 418 }
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 void resultAccessed(TargetedResult result) {} 1269 void resultAccessed(TargetedResult result) {}
1270 1270
1271 @override 1271 @override
1272 List<TargetedResult> resultStored(TargetedResult newResult, newValue) { 1272 List<TargetedResult> resultStored(TargetedResult newResult, newValue) {
1273 return TargetedResult.EMPTY_LIST; 1273 return TargetedResult.EMPTY_LIST;
1274 } 1274 }
1275 1275
1276 @override 1276 @override
1277 void targetRemoved(AnalysisTarget target) {} 1277 void targetRemoved(AnalysisTarget target) {}
1278 } 1278 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698