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

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

Issue 1486663003: Ensure that a complete library element has constants evaluated (issue 24890) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated after breaking changes Created 5 years 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/services/completion/dart/completion_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;
(...skipping 16 matching lines...) Expand all
27 import 'package:analyzer/source/pub_package_map_provider.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/java_io.dart'; 32 import 'package:analyzer/src/generated/java_io.dart';
33 import 'package:analyzer/src/generated/sdk.dart'; 33 import 'package:analyzer/src/generated/sdk.dart';
34 import 'package:analyzer/src/generated/source.dart'; 34 import 'package:analyzer/src/generated/source.dart';
35 import 'package:analyzer/src/generated/source_io.dart'; 35 import 'package:analyzer/src/generated/source_io.dart';
36 import 'package:analyzer/src/generated/utilities_general.dart'; 36 import 'package:analyzer/src/generated/utilities_general.dart';
37 import 'package:analyzer/src/task/dart.dart';
37 import 'package:analyzer/src/util/glob.dart'; 38 import 'package:analyzer/src/util/glob.dart';
38 import 'package:plugin/plugin.dart'; 39 import 'package:plugin/plugin.dart';
39 40
40 typedef void OptionUpdater(AnalysisOptionsImpl options); 41 typedef void OptionUpdater(AnalysisOptionsImpl options);
41 42
42 /** 43 /**
43 * Enum representing reasons why analysis might be done for a given file. 44 * Enum representing reasons why analysis might be done for a given file.
44 */ 45 */
45 class AnalysisDoneReason { 46 class AnalysisDoneReason {
46 /** 47 /**
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 * been yet resolved, or any problem happened. 1324 * been yet resolved, or any problem happened.
1324 */ 1325 */
1325 CompilationUnit _getResolvedCompilationUnitToResendNotification( 1326 CompilationUnit _getResolvedCompilationUnitToResendNotification(
1326 AnalysisContext context, Source source) { 1327 AnalysisContext context, Source source) {
1327 List<Source> librarySources = context.getLibrariesContaining(source); 1328 List<Source> librarySources = context.getLibrariesContaining(source);
1328 if (librarySources.isEmpty) { 1329 if (librarySources.isEmpty) {
1329 return null; 1330 return null;
1330 } 1331 }
1331 // if library has not been resolved yet, the unit will be resolved later 1332 // if library has not been resolved yet, the unit will be resolved later
1332 Source librarySource = librarySources[0]; 1333 Source librarySource = librarySources[0];
1333 if (context.getLibraryElement(librarySource) == null) { 1334 if (context.getResult(librarySource, LIBRARY_ELEMENT8) == null) {
1334 return null; 1335 return null;
1335 } 1336 }
1336 // if library has been already resolved, resolve unit 1337 // if library has been already resolved, resolve unit
1337 return runWithWorkingCacheSize(context, () { 1338 return runWithWorkingCacheSize(context, () {
1338 return context.resolveCompilationUnit2(source, librarySource); 1339 return context.resolveCompilationUnit2(source, librarySource);
1339 }); 1340 });
1340 } 1341 }
1341 1342
1342 _scheduleAnalysisImplementedNotification() async { 1343 _scheduleAnalysisImplementedNotification() async {
1343 Set<String> files = analysisServices[AnalysisService.IMPLEMENTED]; 1344 Set<String> files = analysisServices[AnalysisService.IMPLEMENTED];
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1676 /** 1677 /**
1677 * The [PerformanceTag] for time spent in server request handlers. 1678 * The [PerformanceTag] for time spent in server request handlers.
1678 */ 1679 */
1679 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 1680 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
1680 1681
1681 /** 1682 /**
1682 * The [PerformanceTag] for time spent in split store microtasks. 1683 * The [PerformanceTag] for time spent in split store microtasks.
1683 */ 1684 */
1684 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 1685 static PerformanceTag splitStore = new PerformanceTag('splitStore');
1685 } 1686 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698