| 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.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/file_system/file_system.dart'; | 10 import 'package:analyzer/file_system/file_system.dart'; |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 } | 772 } |
| 773 } | 773 } |
| 774 thisData.dependedOnResults = dependedOn; | 774 thisData.dependedOnResults = dependedOn; |
| 775 int newLength = dependedOn.length; | 775 int newLength = dependedOn.length; |
| 776 for (int i = 0; i < newLength; i++) { | 776 for (int i = 0; i < newLength; i++) { |
| 777 TargetedResult dependedOnResult = dependedOn[i]; | 777 TargetedResult dependedOnResult = dependedOn[i]; |
| 778 for (int j = 0; j < cacheLength; j++) { | 778 for (int j = 0; j < cacheLength; j++) { |
| 779 AnalysisCache cache = caches[j]; | 779 AnalysisCache cache = caches[j]; |
| 780 CacheEntry entry = cache.get(dependedOnResult.target); | 780 CacheEntry entry = cache.get(dependedOnResult.target); |
| 781 if (entry != null) { | 781 if (entry != null) { |
| 782 ResultData data = entry.getResultDataOrNull(dependedOnResult.result); | 782 ResultData data = entry.getResultData(dependedOnResult.result); |
| 783 if (data != null) { | 783 data.dependentResults.add(thisResult); |
| 784 data.dependentResults.add(thisResult); | |
| 785 } | |
| 786 } | 784 } |
| 787 } | 785 } |
| 788 } | 786 } |
| 789 } | 787 } |
| 790 | 788 |
| 791 /** | 789 /** |
| 792 * Set states of the given and dependent results to [CacheState.ERROR] and | 790 * Set states of the given and dependent results to [CacheState.ERROR] and |
| 793 * their values to the corresponding default values | 791 * their values to the corresponding default values |
| 794 */ | 792 */ |
| 795 void _setErrorState(ResultDescriptor descriptor, CaughtException exception) { | 793 void _setErrorState(ResultDescriptor descriptor, CaughtException exception) { |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1492 void resultAccessed(TargetedResult result) {} | 1490 void resultAccessed(TargetedResult result) {} |
| 1493 | 1491 |
| 1494 @override | 1492 @override |
| 1495 List<TargetedResult> resultStored(TargetedResult newResult, newValue) { | 1493 List<TargetedResult> resultStored(TargetedResult newResult, newValue) { |
| 1496 return TargetedResult.EMPTY_LIST; | 1494 return TargetedResult.EMPTY_LIST; |
| 1497 } | 1495 } |
| 1498 | 1496 |
| 1499 @override | 1497 @override |
| 1500 void targetRemoved(AnalysisTarget target) {} | 1498 void targetRemoved(AnalysisTarget target) {} |
| 1501 } | 1499 } |
| OLD | NEW |