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:core' hide Resource; | 9 import 'dart:core' hide Resource; |
10 import 'dart:math' show max; | 10 import 'dart:math' show max; |
(...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1413 * been yet resolved, or any problem happened. | 1413 * been yet resolved, or any problem happened. |
1414 */ | 1414 */ |
1415 CompilationUnit _getResolvedCompilationUnitToResendNotification( | 1415 CompilationUnit _getResolvedCompilationUnitToResendNotification( |
1416 AnalysisContext context, Source source) { | 1416 AnalysisContext context, Source source) { |
1417 List<Source> librarySources = context.getLibrariesContaining(source); | 1417 List<Source> librarySources = context.getLibrariesContaining(source); |
1418 if (librarySources.isEmpty) { | 1418 if (librarySources.isEmpty) { |
1419 return null; | 1419 return null; |
1420 } | 1420 } |
1421 // if library has not been resolved yet, the unit will be resolved later | 1421 // if library has not been resolved yet, the unit will be resolved later |
1422 Source librarySource = librarySources[0]; | 1422 Source librarySource = librarySources[0]; |
1423 if (context.getResult(librarySource, LIBRARY_ELEMENT5) == null) { | 1423 if (context.getResult(librarySource, LIBRARY_ELEMENT6) == null) { |
1424 return null; | 1424 return null; |
1425 } | 1425 } |
1426 // if library has been already resolved, resolve unit | 1426 // if library has been already resolved, resolve unit |
1427 return runWithWorkingCacheSize(context, () { | 1427 return runWithWorkingCacheSize(context, () { |
1428 return context.resolveCompilationUnit2(source, librarySource); | 1428 return context.resolveCompilationUnit2(source, librarySource); |
1429 }); | 1429 }); |
1430 } | 1430 } |
1431 | 1431 |
1432 _scheduleAnalysisImplementedNotification() async { | 1432 _scheduleAnalysisImplementedNotification() async { |
1433 Set<String> files = analysisServices[AnalysisService.IMPLEMENTED]; | 1433 Set<String> files = analysisServices[AnalysisService.IMPLEMENTED]; |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1765 /** | 1765 /** |
1766 * The [PerformanceTag] for time spent in server request handlers. | 1766 * The [PerformanceTag] for time spent in server request handlers. |
1767 */ | 1767 */ |
1768 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 1768 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
1769 | 1769 |
1770 /** | 1770 /** |
1771 * The [PerformanceTag] for time spent in split store microtasks. | 1771 * The [PerformanceTag] for time spent in split store microtasks. |
1772 */ | 1772 */ |
1773 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 1773 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
1774 } | 1774 } |
OLD | NEW |