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

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

Issue 1657463002: Element no longer implements AnalysisTarget Base URL: git@github.com:dart-lang/sdk.git@fixhash
Patch Set: Created 4 years, 10 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
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/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 void put(CacheEntry entry) { 923 void put(CacheEntry entry) {
924 AnalysisTarget target = entry.target; 924 AnalysisTarget target = entry.target;
925 if (entry._partition != null) { 925 if (entry._partition != null) {
926 throw new StateError( 926 throw new StateError(
927 'The entry for $target is already in ${entry._partition}'); 927 'The entry for $target is already in ${entry._partition}');
928 } 928 }
929 entry._partition = this; 929 entry._partition = this;
930 entry.fixExceptionState(); 930 entry.fixExceptionState();
931 if (target is ElementImpl) { 931 if (target is ElementImpl) {
932 // Detect attempts to mutate the map key. 932 // Detect attempts to mutate the map key.
933 target.frozen = true; 933 (target as ElementImpl).frozen = true;
Brian Wilkerson 2016/02/01 15:43:20 Seem like this change should be moved back to the
934 } 934 }
935 entryMap[target] = entry; 935 entryMap[target] = entry;
936 _addIfSource(target); 936 _addIfSource(target);
937 } 937 }
938 938
939 /** 939 /**
940 * Remove all information related to the given [target] from this partition. 940 * Remove all information related to the given [target] from this partition.
941 * Return the entry associated with the target, or `null` if there was cache 941 * Return the entry associated with the target, or `null` if there was cache
942 * entry for the target. 942 * entry for the target.
943 */ 943 */
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 void resultAccessed(TargetedResult result) {} 1262 void resultAccessed(TargetedResult result) {}
1263 1263
1264 @override 1264 @override
1265 List<TargetedResult> resultStored(TargetedResult newResult, newValue) { 1265 List<TargetedResult> resultStored(TargetedResult newResult, newValue) {
1266 return TargetedResult.EMPTY_LIST; 1266 return TargetedResult.EMPTY_LIST;
1267 } 1267 }
1268 1268
1269 @override 1269 @override
1270 void targetRemoved(AnalysisTarget target) {} 1270 void targetRemoved(AnalysisTarget target) {}
1271 } 1271 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698