| 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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 } | 1078 } |
| 1079 } | 1079 } |
| 1080 } | 1080 } |
| 1081 // Fill the source map. | 1081 // Fill the source map. |
| 1082 bool contextFound = false; | 1082 bool contextFound = false; |
| 1083 if (preferredContext != null) { | 1083 if (preferredContext != null) { |
| 1084 sourceMap.putIfAbsent(preferredContext, () => <Source>[]).add(source); | 1084 sourceMap.putIfAbsent(preferredContext, () => <Source>[]).add(source); |
| 1085 contextFound = true; | 1085 contextFound = true; |
| 1086 } | 1086 } |
| 1087 for (AnalysisContext context in folderMap.values) { | 1087 for (AnalysisContext context in folderMap.values) { |
| 1088 if (context.getKindOf(source) != SourceKind.UNKNOWN) { | 1088 if (context != preferredContext && |
| 1089 context.getKindOf(source) != SourceKind.UNKNOWN) { |
| 1089 sourceMap.putIfAbsent(context, () => <Source>[]).add(source); | 1090 sourceMap.putIfAbsent(context, () => <Source>[]).add(source); |
| 1090 contextFound = true; | 1091 contextFound = true; |
| 1091 } | 1092 } |
| 1092 } | 1093 } |
| 1093 if (firstSource == null) { | 1094 if (firstSource == null) { |
| 1094 firstSource = source; | 1095 firstSource = source; |
| 1095 } | 1096 } |
| 1096 if (!contextFound) { | 1097 if (!contextFound) { |
| 1097 unanalyzed.add(file); | 1098 unanalyzed.add(file); |
| 1098 } | 1099 } |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1605 /** | 1606 /** |
| 1606 * The [PerformanceTag] for time spent in server request handlers. | 1607 * The [PerformanceTag] for time spent in server request handlers. |
| 1607 */ | 1608 */ |
| 1608 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 1609 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
| 1609 | 1610 |
| 1610 /** | 1611 /** |
| 1611 * The [PerformanceTag] for time spent in split store microtasks. | 1612 * The [PerformanceTag] for time spent in split store microtasks. |
| 1612 */ | 1613 */ |
| 1613 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 1614 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
| 1614 } | 1615 } |
| OLD | NEW |