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 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
972 }); | 972 }); |
973 if (unanalyzed.isNotEmpty) { | 973 if (unanalyzed.isNotEmpty) { |
974 StringBuffer buffer = new StringBuffer(); | 974 StringBuffer buffer = new StringBuffer(); |
975 buffer.writeAll(unanalyzed, ', '); | 975 buffer.writeAll(unanalyzed, ', '); |
976 throw new RequestFailure( | 976 throw new RequestFailure( |
977 new Response.unanalyzedPriorityFiles(requestId, buffer.toString())); | 977 new Response.unanalyzedPriorityFiles(requestId, buffer.toString())); |
978 } | 978 } |
979 folderMap.forEach((Folder folder, AnalysisContext context) { | 979 folderMap.forEach((Folder folder, AnalysisContext context) { |
980 List<Source> sourceList = sourceMap[context]; | 980 List<Source> sourceList = sourceMap[context]; |
981 if (sourceList == null) { | 981 if (sourceList == null) { |
982 sourceList = Source.EMPTY_ARRAY; | 982 sourceList = Source.EMPTY_LIST; |
983 } | 983 } |
984 context.analysisPriorityOrder = sourceList; | 984 context.analysisPriorityOrder = sourceList; |
985 // Schedule the context for analysis so that it has the opportunity to | 985 // Schedule the context for analysis so that it has the opportunity to |
986 // cache the AST's for the priority sources as soon as possible. | 986 // cache the AST's for the priority sources as soon as possible. |
987 schedulePerformAnalysisOperation(context); | 987 schedulePerformAnalysisOperation(context); |
988 }); | 988 }); |
989 operationQueue.reschedule(); | 989 operationQueue.reschedule(); |
990 _onPriorityChangeController.add(new PriorityChangeEvent(firstSource)); | 990 _onPriorityChangeController.add(new PriorityChangeEvent(firstSource)); |
991 } | 991 } |
992 | 992 |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 /** | 1500 /** |
1501 * The [PerformanceTag] for time spent in server request handlers. | 1501 * The [PerformanceTag] for time spent in server request handlers. |
1502 */ | 1502 */ |
1503 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 1503 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
1504 | 1504 |
1505 /** | 1505 /** |
1506 * The [PerformanceTag] for time spent in split store microtasks. | 1506 * The [PerformanceTag] for time spent in split store microtasks. |
1507 */ | 1507 */ |
1508 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 1508 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
1509 } | 1509 } |
OLD | NEW |