Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 1256793006: Stop optimizing uses of "pub list". (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/context_manager.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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;
11 11
12 import 'package:analysis_server/plugin/analyzed_files.dart'; 12 import 'package:analysis_server/plugin/analyzed_files.dart';
13 import 'package:analysis_server/src/analysis_logger.dart'; 13 import 'package:analysis_server/src/analysis_logger.dart';
14 import 'package:analysis_server/src/channel/channel.dart'; 14 import 'package:analysis_server/src/channel/channel.dart';
15 import 'package:analysis_server/src/context_manager.dart'; 15 import 'package:analysis_server/src/context_manager.dart';
16 import 'package:analysis_server/src/operation/operation.dart'; 16 import 'package:analysis_server/src/operation/operation.dart';
17 import 'package:analysis_server/src/operation/operation_analysis.dart'; 17 import 'package:analysis_server/src/operation/operation_analysis.dart';
18 import 'package:analysis_server/src/operation/operation_queue.dart'; 18 import 'package:analysis_server/src/operation/operation_queue.dart';
19 import 'package:analysis_server/src/plugin/server_plugin.dart'; 19 import 'package:analysis_server/src/plugin/server_plugin.dart';
20 import 'package:analysis_server/src/protocol.dart' hide Element; 20 import 'package:analysis_server/src/protocol.dart' hide Element;
21 import 'package:analysis_server/src/services/correction/namespace.dart'; 21 import 'package:analysis_server/src/services/correction/namespace.dart';
22 import 'package:analysis_server/src/services/index/index.dart'; 22 import 'package:analysis_server/src/services/index/index.dart';
23 import 'package:analysis_server/src/services/search/search_engine.dart'; 23 import 'package:analysis_server/src/services/search/search_engine.dart';
24 import 'package:analysis_server/src/source/optimizing_pub_package_map_provider.d art';
25 import 'package:analysis_server/uri/resolver_provider.dart'; 24 import 'package:analysis_server/uri/resolver_provider.dart';
26 import 'package:analyzer/file_system/file_system.dart'; 25 import 'package:analyzer/file_system/file_system.dart';
27 import 'package:analyzer/instrumentation/instrumentation.dart'; 26 import 'package:analyzer/instrumentation/instrumentation.dart';
27 import 'package:analyzer/source/pub_package_map_provider.dart';
28 import 'package:analyzer/src/generated/ast.dart'; 28 import 'package:analyzer/src/generated/ast.dart';
29 import 'package:analyzer/src/generated/element.dart'; 29 import 'package:analyzer/src/generated/element.dart';
30 import 'package:analyzer/src/generated/engine.dart'; 30 import 'package:analyzer/src/generated/engine.dart';
31 import 'package:analyzer/src/generated/java_engine.dart'; 31 import 'package:analyzer/src/generated/java_engine.dart';
32 import 'package:analyzer/src/generated/sdk.dart'; 32 import 'package:analyzer/src/generated/sdk.dart';
33 import 'package:analyzer/src/generated/source.dart'; 33 import 'package:analyzer/src/generated/source.dart';
34 import 'package:analyzer/src/generated/source_io.dart'; 34 import 'package:analyzer/src/generated/source_io.dart';
35 import 'package:analyzer/src/generated/utilities_general.dart'; 35 import 'package:analyzer/src/generated/utilities_general.dart';
36 import 'package:package_config/packages.dart';
37 import 'package:plugin/plugin.dart'; 36 import 'package:plugin/plugin.dart';
38 37
39 typedef void OptionUpdater(AnalysisOptionsImpl options); 38 typedef void OptionUpdater(AnalysisOptionsImpl options);
40 39
41 /** 40 /**
42 * Enum representing reasons why analysis might be done for a given file. 41 * Enum representing reasons why analysis might be done for a given file.
43 */ 42 */
44 class AnalysisDoneReason { 43 class AnalysisDoneReason {
45 /** 44 /**
46 * Analysis of the file completed successfully. 45 * Analysis of the file completed successfully.
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 * 285 *
287 * If a [contextManager] is provided, then the [packageResolverProvider] will 286 * If a [contextManager] is provided, then the [packageResolverProvider] will
288 * be ignored. 287 * be ignored.
289 * 288 *
290 * If [rethrowExceptions] is true, then any exceptions thrown by analysis are 289 * If [rethrowExceptions] is true, then any exceptions thrown by analysis are
291 * propagated up the call stack. The default is true to allow analysis 290 * propagated up the call stack. The default is true to allow analysis
292 * exceptions to show up in unit tests, but it should be set to false when 291 * exceptions to show up in unit tests, but it should be set to false when
293 * running a full analysis server. 292 * running a full analysis server.
294 */ 293 */
295 AnalysisServer(this.channel, this.resourceProvider, 294 AnalysisServer(this.channel, this.resourceProvider,
296 OptimizingPubPackageMapProvider packageMapProvider, Index _index, 295 PubPackageMapProvider packageMapProvider, Index _index, this.serverPlugin,
297 this.serverPlugin, this.options, this.defaultSdk, 296 this.options, this.defaultSdk, this.instrumentationService,
298 this.instrumentationService, {ContextManager contextManager: null, 297 {ContextManager contextManager: null,
299 ResolverProvider packageResolverProvider: null, 298 ResolverProvider packageResolverProvider: null,
300 this.rethrowExceptions: true}) 299 this.rethrowExceptions: true})
301 : index = _index, 300 : index = _index,
302 searchEngine = _index != null ? createSearchEngine(_index) : null { 301 searchEngine = _index != null ? createSearchEngine(_index) : null {
303 _performance = performanceDuringStartup; 302 _performance = performanceDuringStartup;
304 operationQueue = new ServerOperationQueue(); 303 operationQueue = new ServerOperationQueue();
305 if (contextManager == null) { 304 if (contextManager == null) {
306 contextManager = new ContextManagerImpl(resourceProvider, 305 contextManager = new ContextManagerImpl(resourceProvider,
307 packageResolverProvider, packageMapProvider, instrumentationService); 306 packageResolverProvider, packageMapProvider, instrumentationService);
308 } 307 }
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 /** 1552 /**
1554 * The [PerformanceTag] for time spent in server request handlers. 1553 * The [PerformanceTag] for time spent in server request handlers.
1555 */ 1554 */
1556 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 1555 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
1557 1556
1558 /** 1557 /**
1559 * The [PerformanceTag] for time spent in split store microtasks. 1558 * The [PerformanceTag] for time spent in split store microtasks.
1560 */ 1559 */
1561 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 1560 static PerformanceTag splitStore = new PerformanceTag('splitStore');
1562 } 1561 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/context_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698