| 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/src/generated/engine.dart' | 10 import 'package:analyzer/src/generated/engine.dart' |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 if (deltaResult == DeltaResult.KEEP_CONTINUE) { | 534 if (deltaResult == DeltaResult.KEEP_CONTINUE) { |
| 535 thisData = _resultMap[descriptor]; | 535 thisData = _resultMap[descriptor]; |
| 536 } | 536 } |
| 537 if (thisData == null) { | 537 if (thisData == null) { |
| 538 return; | 538 return; |
| 539 } | 539 } |
| 540 // Stop depending on other results. | 540 // Stop depending on other results. |
| 541 TargetedResult thisResult = new TargetedResult(target, descriptor); | 541 TargetedResult thisResult = new TargetedResult(target, descriptor); |
| 542 for (TargetedResult dependedOnResult in thisData.dependedOnResults) { | 542 for (TargetedResult dependedOnResult in thisData.dependedOnResults) { |
| 543 ResultData data = _partition._getDataFor(dependedOnResult); | 543 ResultData data = _partition._getDataFor(dependedOnResult); |
| 544 if (data != null) { | 544 if (data != null && deltaResult != DeltaResult.KEEP_CONTINUE) { |
| 545 data.dependentResults.remove(thisResult); | 545 data.dependentResults.remove(thisResult); |
| 546 } | 546 } |
| 547 } | 547 } |
| 548 // Invalidate results that depend on this result. | 548 // Invalidate results that depend on this result. |
| 549 List<TargetedResult> dependentResults = thisData.dependentResults.toList(); | 549 List<TargetedResult> dependentResults = thisData.dependentResults.toList(); |
| 550 for (TargetedResult dependentResult in dependentResults) { | 550 for (TargetedResult dependentResult in dependentResults) { |
| 551 CacheEntry entry = _partition.get(dependentResult.target); | 551 CacheEntry entry = _partition.get(dependentResult.target); |
| 552 if (entry != null) { | 552 if (entry != null) { |
| 553 entry._invalidate(dependentResult.result, delta); | 553 entry._invalidate(dependentResult.result, delta); |
| 554 } | 554 } |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1144 void resultAccessed(TargetedResult result) {} | 1144 void resultAccessed(TargetedResult result) {} |
| 1145 | 1145 |
| 1146 @override | 1146 @override |
| 1147 List<TargetedResult> resultStored(TargetedResult newResult, newValue) { | 1147 List<TargetedResult> resultStored(TargetedResult newResult, newValue) { |
| 1148 return TargetedResult.EMPTY_LIST; | 1148 return TargetedResult.EMPTY_LIST; |
| 1149 } | 1149 } |
| 1150 | 1150 |
| 1151 @override | 1151 @override |
| 1152 void targetRemoved(AnalysisTarget target) {} | 1152 void targetRemoved(AnalysisTarget target) {} |
| 1153 } | 1153 } |
| OLD | NEW |