| 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 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1240 buffer.writeln(" removed"); | 1240 buffer.writeln(" removed"); |
| 1241 for (Source source in missingSources) { | 1241 for (Source source in missingSources) { |
| 1242 buffer.write(" "); | 1242 buffer.write(" "); |
| 1243 buffer.writeln(source.fullName); | 1243 buffer.writeln(source.fullName); |
| 1244 } | 1244 } |
| 1245 _logInformation(buffer.toString()); | 1245 _logInformation(buffer.toString()); |
| 1246 } | 1246 } |
| 1247 return changedSources.length > 0; | 1247 return changedSources.length > 0; |
| 1248 } | 1248 } |
| 1249 | 1249 |
| 1250 @deprecated |
| 1250 @override | 1251 @override |
| 1251 void visitCacheItems(void callback(Source source, SourceEntry dartEntry, | 1252 void visitCacheItems(void callback(Source source, SourceEntry dartEntry, |
| 1252 DataDescriptor rowDesc, CacheState state)) { | 1253 DataDescriptor rowDesc, CacheState state)) { |
| 1253 // TODO(brianwilkerson) Figure out where this is used and either remove it | 1254 // TODO(brianwilkerson) Figure out where this is used and either remove it |
| 1254 // or adjust the call sites to use CacheEntry's. | 1255 // or adjust the call sites to use CacheEntry's. |
| 1255 // bool hintsEnabled = _options.hint; | 1256 // bool hintsEnabled = _options.hint; |
| 1256 // bool lintsEnabled = _options.lint; | 1257 // bool lintsEnabled = _options.lint; |
| 1257 // MapIterator<AnalysisTarget, cache.CacheEntry> iterator = _cache.iterator()
; | 1258 // MapIterator<AnalysisTarget, cache.CacheEntry> iterator = _cache.iterator()
; |
| 1258 // while (iterator.moveNext()) { | 1259 // while (iterator.moveNext()) { |
| 1259 // Source source = iterator.key; | 1260 // Source source = iterator.key; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1305 // continue; | 1306 // continue; |
| 1306 // } | 1307 // } |
| 1307 // callback(librarySource, entry, descriptor, | 1308 // callback(librarySource, entry, descriptor, |
| 1308 // entry.getStateInLibrary(descriptor, librarySource)); | 1309 // entry.getStateInLibrary(descriptor, librarySource)); |
| 1309 // } | 1310 // } |
| 1310 // } | 1311 // } |
| 1311 // } | 1312 // } |
| 1312 // } | 1313 // } |
| 1313 } | 1314 } |
| 1314 | 1315 |
| 1315 /** | 1316 @override |
| 1316 * Visit all entries of the content cache. | |
| 1317 */ | |
| 1318 void visitContentCache(ContentCacheVisitor visitor) { | 1317 void visitContentCache(ContentCacheVisitor visitor) { |
| 1319 _contentCache.accept(visitor); | 1318 _contentCache.accept(visitor); |
| 1320 } | 1319 } |
| 1321 | 1320 |
| 1322 /** | 1321 /** |
| 1323 * Add all of the sources contained in the given source [container] to the | 1322 * Add all of the sources contained in the given source [container] to the |
| 1324 * given list of [sources]. | 1323 * given list of [sources]. |
| 1325 */ | 1324 */ |
| 1326 void _addSourcesInContainer(List<Source> sources, SourceContainer container) { | 1325 void _addSourcesInContainer(List<Source> sources, SourceContainer container) { |
| 1327 for (Source source in _cache.sources) { | 1326 for (Source source in _cache.sources) { |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2027 new PendingFuture<T>(_context, target, computeValue); | 2026 new PendingFuture<T>(_context, target, computeValue); |
| 2028 if (!pendingFuture.evaluate(entry)) { | 2027 if (!pendingFuture.evaluate(entry)) { |
| 2029 _context._pendingFutureTargets | 2028 _context._pendingFutureTargets |
| 2030 .putIfAbsent(target, () => <PendingFuture>[]) | 2029 .putIfAbsent(target, () => <PendingFuture>[]) |
| 2031 .add(pendingFuture); | 2030 .add(pendingFuture); |
| 2032 scheduleComputation(); | 2031 scheduleComputation(); |
| 2033 } | 2032 } |
| 2034 return pendingFuture.future; | 2033 return pendingFuture.future; |
| 2035 } | 2034 } |
| 2036 } | 2035 } |
| OLD | NEW |