| 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 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 entry.setState(RESOLVED_UNIT, CacheState.FLUSHED); | 1145 entry.setState(RESOLVED_UNIT, CacheState.FLUSHED); |
| 1146 entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED); | 1146 entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED); |
| 1147 entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED); | 1147 entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED); |
| 1148 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED); | 1148 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED); |
| 1149 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED); | 1149 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED); |
| 1150 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED); | 1150 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED); |
| 1151 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED); | 1151 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED); |
| 1152 entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED); | 1152 entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED); |
| 1153 entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED); | 1153 entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED); |
| 1154 entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED); | 1154 entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED); |
| 1155 entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED); |
| 1155 // USED_IMPORTED_ELEMENTS | 1156 // USED_IMPORTED_ELEMENTS |
| 1156 // USED_LOCAL_ELEMENTS | 1157 // USED_LOCAL_ELEMENTS |
| 1158 setValue(STRONG_MODE_ERRORS, AnalysisError.NO_ERRORS); |
| 1157 setValue(VARIABLE_REFERENCE_ERRORS, AnalysisError.NO_ERRORS); | 1159 setValue(VARIABLE_REFERENCE_ERRORS, AnalysisError.NO_ERRORS); |
| 1158 setValue(VERIFY_ERRORS, AnalysisError.NO_ERRORS); | 1160 setValue(VERIFY_ERRORS, AnalysisError.NO_ERRORS); |
| 1159 }); | 1161 }); |
| 1160 | 1162 |
| 1161 CacheEntry entry = getCacheEntry(AnalysisContextTarget.request); | 1163 CacheEntry entry = getCacheEntry(AnalysisContextTarget.request); |
| 1162 entry.setValue(TYPE_PROVIDER, typeProvider, TargetedResult.EMPTY_LIST); | 1164 entry.setValue(TYPE_PROVIDER, typeProvider, TargetedResult.EMPTY_LIST); |
| 1163 } | 1165 } |
| 1164 | 1166 |
| 1165 @override | 1167 @override |
| 1166 void removeListener(AnalysisListener listener) { | 1168 void removeListener(AnalysisListener listener) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 entry.setState(PARSED_UNIT, CacheState.FLUSHED); | 1225 entry.setState(PARSED_UNIT, CacheState.FLUSHED); |
| 1224 entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED); | 1226 entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED); |
| 1225 entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED); | 1227 entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED); |
| 1226 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED); | 1228 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED); |
| 1227 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED); | 1229 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED); |
| 1228 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED); | 1230 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED); |
| 1229 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED); | 1231 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED); |
| 1230 entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED); | 1232 entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED); |
| 1231 entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED); | 1233 entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED); |
| 1232 entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED); | 1234 entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED); |
| 1235 entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED); |
| 1233 entry.setState(RESOLVED_UNIT, CacheState.FLUSHED); | 1236 entry.setState(RESOLVED_UNIT, CacheState.FLUSHED); |
| 1234 } | 1237 } |
| 1235 | 1238 |
| 1236 @override | 1239 @override |
| 1237 bool validateCacheConsistency() { | 1240 bool validateCacheConsistency() { |
| 1238 int consistencyCheckStart = JavaSystem.nanoTime(); | 1241 int consistencyCheckStart = JavaSystem.nanoTime(); |
| 1239 HashSet<Source> changedSources = new HashSet<Source>(); | 1242 HashSet<Source> changedSources = new HashSet<Source>(); |
| 1240 HashSet<Source> missingSources = new HashSet<Source>(); | 1243 HashSet<Source> missingSources = new HashSet<Source>(); |
| 1241 for (Source source in _cache.sources) { | 1244 for (Source source in _cache.sources) { |
| 1242 CacheEntry entry = _cache.get(source); | 1245 CacheEntry entry = _cache.get(source); |
| (...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2088 new PendingFuture<T>(_context, target, computeValue); | 2091 new PendingFuture<T>(_context, target, computeValue); |
| 2089 if (!pendingFuture.evaluate(entry)) { | 2092 if (!pendingFuture.evaluate(entry)) { |
| 2090 _context._pendingFutureTargets | 2093 _context._pendingFutureTargets |
| 2091 .putIfAbsent(target, () => <PendingFuture>[]) | 2094 .putIfAbsent(target, () => <PendingFuture>[]) |
| 2092 .add(pendingFuture); | 2095 .add(pendingFuture); |
| 2093 scheduleComputation(); | 2096 scheduleComputation(); |
| 2094 } | 2097 } |
| 2095 return pendingFuture.future; | 2098 return pendingFuture.future; |
| 2096 } | 2099 } |
| 2097 } | 2100 } |
| OLD | NEW |