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 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1652 void _notifyErrors( | 1652 void _notifyErrors( |
1653 Source source, List<AnalysisError> errors, LineInfo lineInfo) { | 1653 Source source, List<AnalysisError> errors, LineInfo lineInfo) { |
1654 int count = _listeners.length; | 1654 int count = _listeners.length; |
1655 for (int i = 0; i < count; i++) { | 1655 for (int i = 0; i < count; i++) { |
1656 _listeners[i].computedErrors(this, source, errors, lineInfo); | 1656 _listeners[i].computedErrors(this, source, errors, lineInfo); |
1657 } | 1657 } |
1658 } | 1658 } |
1659 | 1659 |
1660 void _removeFromCache(Source source) { | 1660 void _removeFromCache(Source source) { |
1661 CacheEntry entry = _cache.remove(source); | 1661 CacheEntry entry = _cache.remove(source); |
1662 if (entry != null && entry.explicitlyAdded) { | 1662 if (entry != null && !entry.explicitlyAdded) { |
1663 _implicitAnalysisEventsController | 1663 _implicitAnalysisEventsController |
1664 .add(new ImplicitAnalysisEvent(source, false)); | 1664 .add(new ImplicitAnalysisEvent(source, false)); |
1665 } | 1665 } |
1666 } | 1666 } |
1667 | 1667 |
1668 /** | 1668 /** |
1669 * Remove the given [source] from the priority order if it is in the list. | 1669 * Remove the given [source] from the priority order if it is in the list. |
1670 */ | 1670 */ |
1671 void _removeFromPriorityOrder(Source source) { | 1671 void _removeFromPriorityOrder(Source source) { |
1672 int count = _priorityOrder.length; | 1672 int count = _priorityOrder.length; |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2054 new PendingFuture<T>(_context, target, computeValue); | 2054 new PendingFuture<T>(_context, target, computeValue); |
2055 if (!pendingFuture.evaluate(entry)) { | 2055 if (!pendingFuture.evaluate(entry)) { |
2056 _context._pendingFutureTargets | 2056 _context._pendingFutureTargets |
2057 .putIfAbsent(target, () => <PendingFuture>[]) | 2057 .putIfAbsent(target, () => <PendingFuture>[]) |
2058 .add(pendingFuture); | 2058 .add(pendingFuture); |
2059 scheduleComputation(); | 2059 scheduleComputation(); |
2060 } | 2060 } |
2061 return pendingFuture.future; | 2061 return pendingFuture.future; |
2062 } | 2062 } |
2063 } | 2063 } |
OLD | NEW |