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.context; | 5 library analyzer.src.context.context; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 | 9 |
10 import 'package:analyzer/instrumentation/instrumentation.dart'; | 10 import 'package:analyzer/instrumentation/instrumentation.dart'; |
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED); | 1176 entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED); |
1177 entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED); | 1177 entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED); |
1178 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED); | 1178 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED); |
1179 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED); | 1179 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED); |
1180 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED); | 1180 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED); |
1181 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED); | 1181 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED); |
1182 entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED); | 1182 entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED); |
1183 entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED); | 1183 entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED); |
1184 entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED); | 1184 entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED); |
1185 entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED); | 1185 entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED); |
| 1186 entry.setState(RESOLVED_UNIT11, CacheState.FLUSHED); |
1186 // USED_IMPORTED_ELEMENTS | 1187 // USED_IMPORTED_ELEMENTS |
1187 // USED_LOCAL_ELEMENTS | 1188 // USED_LOCAL_ELEMENTS |
1188 setValue(STRONG_MODE_ERRORS, AnalysisError.NO_ERRORS); | 1189 setValue(STRONG_MODE_ERRORS, AnalysisError.NO_ERRORS); |
1189 setValue(VARIABLE_REFERENCE_ERRORS, AnalysisError.NO_ERRORS); | 1190 setValue(VARIABLE_REFERENCE_ERRORS, AnalysisError.NO_ERRORS); |
1190 setValue(VERIFY_ERRORS, AnalysisError.NO_ERRORS); | 1191 setValue(VERIFY_ERRORS, AnalysisError.NO_ERRORS); |
1191 }); | 1192 }); |
1192 | 1193 |
1193 CacheEntry entry = getCacheEntry(AnalysisContextTarget.request); | 1194 CacheEntry entry = getCacheEntry(AnalysisContextTarget.request); |
1194 entry.setValue(TYPE_PROVIDER, typeProvider, TargetedResult.EMPTY_LIST); | 1195 entry.setValue(TYPE_PROVIDER, typeProvider, TargetedResult.EMPTY_LIST); |
1195 } | 1196 } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED); | 1262 entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED); |
1262 entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED); | 1263 entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED); |
1263 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED); | 1264 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED); |
1264 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED); | 1265 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED); |
1265 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED); | 1266 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED); |
1266 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED); | 1267 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED); |
1267 entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED); | 1268 entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED); |
1268 entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED); | 1269 entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED); |
1269 entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED); | 1270 entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED); |
1270 entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED); | 1271 entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED); |
| 1272 entry.setState(RESOLVED_UNIT11, CacheState.FLUSHED); |
1271 entry.setState(RESOLVED_UNIT, CacheState.FLUSHED); | 1273 entry.setState(RESOLVED_UNIT, CacheState.FLUSHED); |
1272 } | 1274 } |
1273 | 1275 |
1274 @override | 1276 @override |
1275 bool validateCacheConsistency() { | 1277 bool validateCacheConsistency() { |
1276 int consistencyCheckStart = JavaSystem.nanoTime(); | 1278 int consistencyCheckStart = JavaSystem.nanoTime(); |
1277 HashSet<Source> changedSources = new HashSet<Source>(); | 1279 HashSet<Source> changedSources = new HashSet<Source>(); |
1278 HashSet<Source> missingSources = new HashSet<Source>(); | 1280 HashSet<Source> missingSources = new HashSet<Source>(); |
1279 for (Source source in _cache.sources) { | 1281 for (Source source in _cache.sources) { |
1280 CacheEntry entry = _cache.get(source); | 1282 CacheEntry entry = _cache.get(source); |
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2152 DartSdk sdk = factory.dartSdk; | 2154 DartSdk sdk = factory.dartSdk; |
2153 if (sdk == null) { | 2155 if (sdk == null) { |
2154 throw new IllegalArgumentException( | 2156 throw new IllegalArgumentException( |
2155 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2157 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
2156 } | 2158 } |
2157 return new AnalysisCache(<CachePartition>[ | 2159 return new AnalysisCache(<CachePartition>[ |
2158 AnalysisEngine.instance.partitionManager_new.forSdk(sdk) | 2160 AnalysisEngine.instance.partitionManager_new.forSdk(sdk) |
2159 ]); | 2161 ]); |
2160 } | 2162 } |
2161 } | 2163 } |
OLD | NEW |