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

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

Issue 2172143003: Fix for recording dependency when the user is recorder before the provider. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/cache_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/cache_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698