|
2 | 2 | // for details. All rights reserved. Use of this source code is governed by a
|
3 | 3 | // BSD-style license that can be found in the LICENSE file.
|
4 | 4 |
|
5 |
| -import 'dart:collection'; |
6 |
| - |
7 | 5 | import 'package:analyzer/src/dart/analysis/file_state.dart';
|
8 | 6 | import 'package:analyzer/src/dart/analysis/performance_logger.dart';
|
9 | 7 |
|
@@ -47,37 +45,37 @@ class FileTracker {
|
47 | 45 | /**
|
48 | 46 | * The set of added files.
|
49 | 47 | */
|
50 |
| - final addedFiles = LinkedHashSet<String>(); |
| 48 | + final addedFiles = <String>{}; |
51 | 49 |
|
52 | 50 | /**
|
53 | 51 | * The set of files were reported as changed through [changeFile] and not
|
54 | 52 | * checked for actual changes yet.
|
55 | 53 | */
|
56 |
| - final _changedFiles = LinkedHashSet<String>(); |
| 54 | + final _changedFiles = <String>{}; |
57 | 55 |
|
58 | 56 | /**
|
59 | 57 | * The set of files that are currently scheduled for analysis, which were
|
60 | 58 | * reported as changed through [changeFile].
|
61 | 59 | */
|
62 |
| - var _pendingChangedFiles = LinkedHashSet<String>(); |
| 60 | + var _pendingChangedFiles = <String>{}; |
63 | 61 |
|
64 | 62 | /**
|
65 | 63 | * The set of files that are currently scheduled for analysis, which directly
|
66 | 64 | * import a changed file.
|
67 | 65 | */
|
68 |
| - var _pendingImportFiles = LinkedHashSet<String>(); |
| 66 | + var _pendingImportFiles = <String>{}; |
69 | 67 |
|
70 | 68 | /**
|
71 | 69 | * The set of files that are currently scheduled for analysis, which have an
|
72 | 70 | * error or a warning, which might be fixed by a changed file.
|
73 | 71 | */
|
74 |
| - var _pendingErrorFiles = LinkedHashSet<String>(); |
| 72 | + var _pendingErrorFiles = <String>{}; |
75 | 73 |
|
76 | 74 | /**
|
77 | 75 | * The set of files that are currently scheduled for analysis, and don't
|
78 | 76 | * have any special relation with changed files.
|
79 | 77 | */
|
80 |
| - var _pendingFiles = LinkedHashSet<String>(); |
| 78 | + var _pendingFiles = <String>{}; |
81 | 79 |
|
82 | 80 | FileTracker(this._logger, this._fsState, this._changeHook);
|
83 | 81 |
|
@@ -238,10 +236,10 @@ class FileTracker {
|
238 | 236 | if (anyApiChanged) {
|
239 | 237 | _logger.writeln('API signatures mismatch found.');
|
240 | 238 | // TODO(scheglov) schedule analysis of only affected files
|
241 |
| - var pendingChangedFiles = LinkedHashSet<String>(); |
242 |
| - var pendingImportFiles = LinkedHashSet<String>(); |
243 |
| - var pendingErrorFiles = LinkedHashSet<String>(); |
244 |
| - var pendingFiles = LinkedHashSet<String>(); |
| 239 | + var pendingChangedFiles = <String>{}; |
| 240 | + var pendingImportFiles = <String>{}; |
| 241 | + var pendingErrorFiles = <String>{}; |
| 242 | + var pendingFiles = <String>{}; |
245 | 243 |
|
246 | 244 | // Add the changed file.
|
247 | 245 | if (addedFiles.contains(path)) {
|
|
0 commit comments