| 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/dart/element/element.dart' | 10 import 'package:analyzer/src/dart/element/element.dart' |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 _resultMap.forEach((descriptor, data) { | 352 _resultMap.forEach((descriptor, data) { |
| 353 TargetedResult result = new TargetedResult(target, descriptor); | 353 TargetedResult result = new TargetedResult(target, descriptor); |
| 354 for (TargetedResult dependedOnResult in data.dependedOnResults) { | 354 for (TargetedResult dependedOnResult in data.dependedOnResults) { |
| 355 ResultData dependedOnData = _partition._getDataFor(dependedOnResult); | 355 ResultData dependedOnData = _partition._getDataFor(dependedOnResult); |
| 356 if (dependedOnData != null) { | 356 if (dependedOnData != null) { |
| 357 dependedOnData.dependentResults.remove(result); | 357 dependedOnData.dependentResults.remove(result); |
| 358 } | 358 } |
| 359 } | 359 } |
| 360 }); | 360 }); |
| 361 _resultMap.clear(); | 361 _resultMap.clear(); |
| 362 if (target is ElementImpl) { | 362 AnalysisTarget oldTarget = target; |
| 363 (target as ElementImpl).setModifier(Modifier.CACHE_KEY, false); | 363 if (oldTarget is ElementImpl) { |
| 364 oldTarget.setModifier(Modifier.CACHE_KEY, false); |
| 364 } | 365 } |
| 365 } | 366 } |
| 366 | 367 |
| 367 /** | 368 /** |
| 368 * Fix the state of the [exception] to match the current state of the entry. | 369 * Fix the state of the [exception] to match the current state of the entry. |
| 369 */ | 370 */ |
| 370 void fixExceptionState() { | 371 void fixExceptionState() { |
| 371 if (!hasErrorState()) { | 372 if (!hasErrorState()) { |
| 372 _exception = null; | 373 _exception = null; |
| 373 } | 374 } |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1278 void resultAccessed(TargetedResult result) {} | 1279 void resultAccessed(TargetedResult result) {} |
| 1279 | 1280 |
| 1280 @override | 1281 @override |
| 1281 List<TargetedResult> resultStored(TargetedResult newResult, newValue) { | 1282 List<TargetedResult> resultStored(TargetedResult newResult, newValue) { |
| 1282 return TargetedResult.EMPTY_LIST; | 1283 return TargetedResult.EMPTY_LIST; |
| 1283 } | 1284 } |
| 1284 | 1285 |
| 1285 @override | 1286 @override |
| 1286 void targetRemoved(AnalysisTarget target) {} | 1287 void targetRemoved(AnalysisTarget target) {} |
| 1287 } | 1288 } |
| OLD | NEW |