Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 analysis.server; | 5 library analysis.server; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:math' show max; | 9 import 'dart:math' show max; |
| 10 | 10 |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 726 if (_onAnalysisCompleteCompleter != null) { | 726 if (_onAnalysisCompleteCompleter != null) { |
| 727 _onAnalysisCompleteCompleter.complete(); | 727 _onAnalysisCompleteCompleter.complete(); |
| 728 _onAnalysisCompleteCompleter = null; | 728 _onAnalysisCompleteCompleter = null; |
| 729 } | 729 } |
| 730 ServerPerformanceStatistics.idle.makeCurrent(); | 730 ServerPerformanceStatistics.idle.makeCurrent(); |
| 731 } | 731 } |
| 732 } | 732 } |
| 733 } | 733 } |
| 734 | 734 |
| 735 /** | 735 /** |
| 736 * Trigger reanalysis of all files from disk. | 736 * Trigger reanalysis of all files in the given list of analysis [roots], or |
| 737 * everything if the analysis roots is `null`. | |
| 737 */ | 738 */ |
| 738 void reanalyze() { | 739 void reanalyze(List<Resource> roots) { |
| 739 // Clear any operations that are pending. | 740 // Clear any operations that are pending. |
| 740 operationQueue.clear(); | 741 operationQueue.clear(); |
|
scheglov
2015/03/30 19:41:44
What is there were pending operations for other ro
Brian Wilkerson
2015/03/30 20:33:38
Good catch!
| |
| 741 // Instruct the contextDirectoryManager to rebuild all contexts from | 742 // Instruct the contextDirectoryManager to rebuild all contexts from |
| 742 // scratch. | 743 // scratch. |
| 743 contextDirectoryManager.refresh(); | 744 contextDirectoryManager.refresh(roots); |
| 744 } | 745 } |
| 745 | 746 |
| 746 /** | 747 /** |
| 747 * Schedules execution of the given [ServerOperation]. | 748 * Schedules execution of the given [ServerOperation]. |
| 748 */ | 749 */ |
| 749 void scheduleOperation(ServerOperation operation) { | 750 void scheduleOperation(ServerOperation operation) { |
| 750 addOperation(operation); | 751 addOperation(operation); |
| 751 _schedulePerformOperation(); | 752 _schedulePerformOperation(); |
| 752 } | 753 } |
| 753 | 754 |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1423 /** | 1424 /** |
| 1424 * The [PerformanceTag] for time spent in server request handlers. | 1425 * The [PerformanceTag] for time spent in server request handlers. |
| 1425 */ | 1426 */ |
| 1426 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 1427 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
| 1427 | 1428 |
| 1428 /** | 1429 /** |
| 1429 * The [PerformanceTag] for time spent in split store microtasks. | 1430 * The [PerformanceTag] for time spent in split store microtasks. |
| 1430 */ | 1431 */ |
| 1431 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 1432 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
| 1432 } | 1433 } |
| OLD | NEW |