| 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/src/cancelable_future.dart'; | 10 import 'package:analyzer/src/cancelable_future.dart'; |
| (...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1409 if (nullIfEmpty) { | 1409 if (nullIfEmpty) { |
| 1410 return null; | 1410 return null; |
| 1411 } | 1411 } |
| 1412 return ChangeNoticeImpl.EMPTY_LIST; | 1412 return ChangeNoticeImpl.EMPTY_LIST; |
| 1413 } | 1413 } |
| 1414 List<ChangeNotice> notices = new List.from(_pendingNotices.values); | 1414 List<ChangeNotice> notices = new List.from(_pendingNotices.values); |
| 1415 _pendingNotices.clear(); | 1415 _pendingNotices.clear(); |
| 1416 return notices; | 1416 return notices; |
| 1417 } | 1417 } |
| 1418 | 1418 |
| 1419 /** | 1419 @override |
| 1420 * Return a change notice for the given [source], creating one if one does not | 1420 ChangeNoticeImpl getNotice(Source source) { |
| 1421 * already exist. | |
| 1422 */ | |
| 1423 ChangeNoticeImpl _getNotice(Source source) { | |
| 1424 // Used in commented out code. | |
| 1425 ChangeNoticeImpl notice = _pendingNotices[source]; | 1421 ChangeNoticeImpl notice = _pendingNotices[source]; |
| 1426 if (notice == null) { | 1422 if (notice == null) { |
| 1427 notice = new ChangeNoticeImpl(source); | 1423 notice = new ChangeNoticeImpl(source); |
| 1428 _pendingNotices[source] = notice; | 1424 _pendingNotices[source] = notice; |
| 1429 } | 1425 } |
| 1430 return notice; | 1426 return notice; |
| 1431 } | 1427 } |
| 1432 | 1428 |
| 1433 /** | 1429 /** |
| 1434 * Return a list containing all of the sources known to this context that have | 1430 * Return a list containing all of the sources known to this context that have |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2032 PendingFuture pendingFuture = | 2028 PendingFuture pendingFuture = |
| 2033 new PendingFuture<T>(_context, target, computeValue); | 2029 new PendingFuture<T>(_context, target, computeValue); |
| 2034 if (!pendingFuture.evaluate(entry)) { | 2030 if (!pendingFuture.evaluate(entry)) { |
| 2035 _context._pendingFutureTargets | 2031 _context._pendingFutureTargets |
| 2036 .putIfAbsent(target, () => <PendingFuture>[]) | 2032 .putIfAbsent(target, () => <PendingFuture>[]) |
| 2037 .add(pendingFuture); | 2033 .add(pendingFuture); |
| 2038 } | 2034 } |
| 2039 return pendingFuture.future; | 2035 return pendingFuture.future; |
| 2040 } | 2036 } |
| 2041 } | 2037 } |
| OLD | NEW |