Chromium Code Reviews| 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 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1144 setValue(RESOLVE_UNIT_ERRORS, AnalysisError.NO_ERRORS); | 1144 setValue(RESOLVE_UNIT_ERRORS, AnalysisError.NO_ERRORS); |
| 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); |
|
Brian Wilkerson
2015/10/13 14:21:19
Should this flush RESOLVED_UNIT10?
Leaf
2015/10/13 16:46:27
Good catch, thanks. Done. Also below.
| |
| 1155 // USED_IMPORTED_ELEMENTS | 1155 // USED_IMPORTED_ELEMENTS |
| 1156 // USED_LOCAL_ELEMENTS | 1156 // USED_LOCAL_ELEMENTS |
| 1157 setValue(STRONG_MODE_ERRORS, AnalysisError.NO_ERRORS); | |
| 1157 setValue(VARIABLE_REFERENCE_ERRORS, AnalysisError.NO_ERRORS); | 1158 setValue(VARIABLE_REFERENCE_ERRORS, AnalysisError.NO_ERRORS); |
| 1158 setValue(VERIFY_ERRORS, AnalysisError.NO_ERRORS); | 1159 setValue(VERIFY_ERRORS, AnalysisError.NO_ERRORS); |
| 1159 }); | 1160 }); |
| 1160 | 1161 |
| 1161 CacheEntry entry = getCacheEntry(AnalysisContextTarget.request); | 1162 CacheEntry entry = getCacheEntry(AnalysisContextTarget.request); |
| 1162 entry.setValue(TYPE_PROVIDER, typeProvider, TargetedResult.EMPTY_LIST); | 1163 entry.setValue(TYPE_PROVIDER, typeProvider, TargetedResult.EMPTY_LIST); |
| 1163 } | 1164 } |
| 1164 | 1165 |
| 1165 @override | 1166 @override |
| 1166 void removeListener(AnalysisListener listener) { | 1167 void removeListener(AnalysisListener listener) { |
| (...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2088 new PendingFuture<T>(_context, target, computeValue); | 2089 new PendingFuture<T>(_context, target, computeValue); |
| 2089 if (!pendingFuture.evaluate(entry)) { | 2090 if (!pendingFuture.evaluate(entry)) { |
| 2090 _context._pendingFutureTargets | 2091 _context._pendingFutureTargets |
| 2091 .putIfAbsent(target, () => <PendingFuture>[]) | 2092 .putIfAbsent(target, () => <PendingFuture>[]) |
| 2092 .add(pendingFuture); | 2093 .add(pendingFuture); |
| 2093 scheduleComputation(); | 2094 scheduleComputation(); |
| 2094 } | 2095 } |
| 2095 return pendingFuture.future; | 2096 return pendingFuture.future; |
| 2096 } | 2097 } |
| 2097 } | 2098 } |
| OLD | NEW |