| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 import 'dart:core'; | 7 import 'dart:core'; |
| 8 import 'dart:io' as io; | 8 import 'dart:io' as io; |
| 9 import 'dart:math' show max; | 9 import 'dart:math' show max; |
| 10 | 10 |
| (...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 return new server.AnalysisNavigationParams( | 1340 return new server.AnalysisNavigationParams( |
| 1341 path, collector.regions, collector.targets, collector.files); | 1341 path, collector.regions, collector.targets, collector.files); |
| 1342 } | 1342 } |
| 1343 | 1343 |
| 1344 List<Occurrences> _computeOccurrences(CompilationUnit unit) { | 1344 List<Occurrences> _computeOccurrences(CompilationUnit unit) { |
| 1345 OccurrencesCollectorImpl collector = new OccurrencesCollectorImpl(); | 1345 OccurrencesCollectorImpl collector = new OccurrencesCollectorImpl(); |
| 1346 addDartOccurrences(collector, unit); | 1346 addDartOccurrences(collector, unit); |
| 1347 return collector.allOccurrences; | 1347 return collector.allOccurrences; |
| 1348 } | 1348 } |
| 1349 | 1349 |
| 1350 // ignore: unused_element |
| 1350 server.AnalysisOutlineParams _computeOutlineParams( | 1351 server.AnalysisOutlineParams _computeOutlineParams( |
| 1351 String path, CompilationUnit unit, LineInfo lineInfo) { | 1352 String path, CompilationUnit unit, LineInfo lineInfo) { |
| 1352 // compute FileKind | 1353 // compute FileKind |
| 1353 SourceKind sourceKind = unit.directives.any((d) => d is PartOfDirective) | 1354 SourceKind sourceKind = unit.directives.any((d) => d is PartOfDirective) |
| 1354 ? SourceKind.PART | 1355 ? SourceKind.PART |
| 1355 : SourceKind.LIBRARY; | 1356 : SourceKind.LIBRARY; |
| 1356 server.FileKind fileKind = server.FileKind.LIBRARY; | 1357 server.FileKind fileKind = server.FileKind.LIBRARY; |
| 1357 if (sourceKind == SourceKind.LIBRARY) { | 1358 if (sourceKind == SourceKind.LIBRARY) { |
| 1358 fileKind = server.FileKind.LIBRARY; | 1359 fileKind = server.FileKind.LIBRARY; |
| 1359 } else if (sourceKind == SourceKind.PART) { | 1360 } else if (sourceKind == SourceKind.PART) { |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1503 /** | 1504 /** |
| 1504 * The [PerformanceTag] for time spent in server request handlers. | 1505 * The [PerformanceTag] for time spent in server request handlers. |
| 1505 */ | 1506 */ |
| 1506 static PerformanceTag serverRequests = server.createChild('requests'); | 1507 static PerformanceTag serverRequests = server.createChild('requests'); |
| 1507 | 1508 |
| 1508 /** | 1509 /** |
| 1509 * The [PerformanceTag] for time spent in split store microtasks. | 1510 * The [PerformanceTag] for time spent in split store microtasks. |
| 1510 */ | 1511 */ |
| 1511 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 1512 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
| 1512 } | 1513 } |
| OLD | NEW |