| 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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 | 671 |
| 672 @override | 672 @override |
| 673 void dispose() { | 673 void dispose() { |
| 674 _disposed = true; | 674 _disposed = true; |
| 675 for (List<PendingFuture> pendingFutures in _pendingFutureTargets.values) { | 675 for (List<PendingFuture> pendingFutures in _pendingFutureTargets.values) { |
| 676 for (PendingFuture pendingFuture in pendingFutures) { | 676 for (PendingFuture pendingFuture in pendingFutures) { |
| 677 pendingFuture.forciblyComplete(); | 677 pendingFuture.forciblyComplete(); |
| 678 } | 678 } |
| 679 } | 679 } |
| 680 _pendingFutureTargets.clear(); | 680 _pendingFutureTargets.clear(); |
| 681 _privatePartition.dispose(); |
| 681 } | 682 } |
| 682 | 683 |
| 683 @override | 684 @override |
| 684 List<CompilationUnit> ensureResolvedDartUnits(Source unitSource) { | 685 List<CompilationUnit> ensureResolvedDartUnits(Source unitSource) { |
| 685 // Check every library. | 686 // Check every library. |
| 686 List<CompilationUnit> units = <CompilationUnit>[]; | 687 List<CompilationUnit> units = <CompilationUnit>[]; |
| 687 List<Source> containingLibraries = getLibrariesContaining(unitSource); | 688 List<Source> containingLibraries = getLibrariesContaining(unitSource); |
| 688 for (Source librarySource in containingLibraries) { | 689 for (Source librarySource in containingLibraries) { |
| 689 LibrarySpecificUnit target = | 690 LibrarySpecificUnit target = |
| 690 new LibrarySpecificUnit(librarySource, unitSource); | 691 new LibrarySpecificUnit(librarySource, unitSource); |
| (...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2022 new PendingFuture<T>(_context, target, computeValue); | 2023 new PendingFuture<T>(_context, target, computeValue); |
| 2023 if (!pendingFuture.evaluate(entry)) { | 2024 if (!pendingFuture.evaluate(entry)) { |
| 2024 _context._pendingFutureTargets | 2025 _context._pendingFutureTargets |
| 2025 .putIfAbsent(target, () => <PendingFuture>[]) | 2026 .putIfAbsent(target, () => <PendingFuture>[]) |
| 2026 .add(pendingFuture); | 2027 .add(pendingFuture); |
| 2027 scheduleComputation(); | 2028 scheduleComputation(); |
| 2028 } | 2029 } |
| 2029 return pendingFuture.future; | 2030 return pendingFuture.future; |
| 2030 } | 2031 } |
| 2031 } | 2032 } |
| OLD | NEW |