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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 if (data != null) { | 690 if (data != null) { |
691 data.dependentResults.remove(thisResult); | 691 data.dependentResults.remove(thisResult); |
692 } | 692 } |
693 } | 693 } |
694 } | 694 } |
695 } | 695 } |
696 } | 696 } |
697 // if (deltaResult == null) { | 697 // if (deltaResult == null) { |
698 // String indent = ' ' * level; | 698 // String indent = ' ' * level; |
699 // print('[$id]$indent invalidate $descriptor for $target'); | 699 // print('[$id]$indent invalidate $descriptor for $target'); |
700 // if ('$descriptor for $target' == | |
701 // 'READY_LIBRARY_ELEMENT2 for /Users/scheglov/tmp/limited-invalidati
on/async/lib/async.dart') { | |
702 // print('interesting'); | |
703 // } | |
704 // } | 700 // } |
705 } | 701 } |
706 // Invalidate results that depend on this result. | 702 // Invalidate results that depend on this result. |
707 _invalidateDependentResults(id, thisData, delta, level + 1); | 703 _invalidateDependentResults(id, thisData, delta, level + 1); |
708 // If empty and not explicitly added, remove the entry altogether. | 704 // If empty and not explicitly added, remove the entry altogether. |
709 if (_resultMap.isEmpty && !explicitlyAdded) { | 705 if (_resultMap.isEmpty && !explicitlyAdded) { |
710 CacheEntry entry = _partition.entryMap.remove(target); | 706 CacheEntry entry = _partition.entryMap.remove(target); |
711 if (entry != null) { | 707 if (entry != null) { |
712 entry.dispose(); | 708 entry.dispose(); |
713 } | 709 } |
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1503 void resultAccessed(TargetedResult result) {} | 1499 void resultAccessed(TargetedResult result) {} |
1504 | 1500 |
1505 @override | 1501 @override |
1506 List<TargetedResult> resultStored(TargetedResult newResult, newValue) { | 1502 List<TargetedResult> resultStored(TargetedResult newResult, newValue) { |
1507 return TargetedResult.EMPTY_LIST; | 1503 return TargetedResult.EMPTY_LIST; |
1508 } | 1504 } |
1509 | 1505 |
1510 @override | 1506 @override |
1511 void targetRemoved(AnalysisTarget target) {} | 1507 void targetRemoved(AnalysisTarget target) {} |
1512 } | 1508 } |
OLD | NEW |