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

Side by Side Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 1437893003: Add _embedder.yaml support to analyzer and analysis_server (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
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 engine; 5 library engine;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:math' as math; 9 import 'dart:math' as math;
10 10
11 import 'package:analyzer/source/embedder.dart';
11 import 'package:analyzer/src/cancelable_future.dart'; 12 import 'package:analyzer/src/cancelable_future.dart';
12 import 'package:analyzer/src/context/cache.dart' as cache; 13 import 'package:analyzer/src/context/cache.dart' as cache;
13 import 'package:analyzer/src/context/context.dart' as newContext; 14 import 'package:analyzer/src/context/context.dart' as newContext;
14 import 'package:analyzer/src/generated/incremental_resolution_validator.dart'; 15 import 'package:analyzer/src/generated/incremental_resolution_validator.dart';
15 import 'package:analyzer/src/plugin/command_line_plugin.dart'; 16 import 'package:analyzer/src/plugin/command_line_plugin.dart';
16 import 'package:analyzer/src/plugin/engine_plugin.dart'; 17 import 'package:analyzer/src/plugin/engine_plugin.dart';
17 import 'package:analyzer/src/plugin/options_plugin.dart'; 18 import 'package:analyzer/src/plugin/options_plugin.dart';
18 import 'package:analyzer/src/services/lint.dart'; 19 import 'package:analyzer/src/services/lint.dart';
19 import 'package:analyzer/src/task/manager.dart'; 20 import 'package:analyzer/src/task/manager.dart';
20 import 'package:analyzer/task/dart.dart'; 21 import 'package:analyzer/task/dart.dart';
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 */ 324 */
324 AnalysisOptions get analysisOptions; 325 AnalysisOptions get analysisOptions;
325 326
326 /** 327 /**
327 * Set the set of analysis options controlling the behavior of this context to 328 * Set the set of analysis options controlling the behavior of this context to
328 * the given [options]. Clients can safely assume that all necessary analysis 329 * the given [options]. Clients can safely assume that all necessary analysis
329 * results have been invalidated. 330 * results have been invalidated.
330 */ 331 */
331 void set analysisOptions(AnalysisOptions options); 332 void set analysisOptions(AnalysisOptions options);
332 333
334 /// Return the [EmbedderYamlLocator] for with this context.
335 EmbedderYamlLocator get embedderYamlLocator;
pquitslund 2015/11/12 17:43:09 I'll defer to Brian as to whether we need this in
Brian Wilkerson 2015/11/13 19:54:18 So to be clear, AnalysisContext is the public inte
Cutch 2015/11/14 00:15:17 Moved to InternalAnalysisContext.
336
333 /** 337 /**
334 * Set the order in which sources will be analyzed by [performAnalysisTask] to 338 * Set the order in which sources will be analyzed by [performAnalysisTask] to
335 * match the order of the sources in the given list of [sources]. If a source 339 * match the order of the sources in the given list of [sources]. If a source
336 * that needs to be analyzed is not contained in the list, then it will be 340 * that needs to be analyzed is not contained in the list, then it will be
337 * treated as if it were at the end of the list. If the list is empty (or 341 * treated as if it were at the end of the list. If the list is empty (or
338 * `null`) then no sources will be given priority over other sources. 342 * `null`) then no sources will be given priority over other sources.
339 * 343 *
340 * Changes made to the list after this method returns will <b>not</b> be 344 * Changes made to the list after this method returns will <b>not</b> be
341 * reflected in the priority order. 345 * reflected in the priority order.
342 */ 346 */
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 * Configuration data associated with this context. 961 * Configuration data associated with this context.
958 */ 962 */
959 final HashMap<ResultDescriptor, Object> _configurationData = 963 final HashMap<ResultDescriptor, Object> _configurationData =
960 new HashMap<ResultDescriptor, Object>(); 964 new HashMap<ResultDescriptor, Object>();
961 965
962 /** 966 /**
963 * The set of analysis options controlling the behavior of this context. 967 * The set of analysis options controlling the behavior of this context.
964 */ 968 */
965 AnalysisOptionsImpl _options = new AnalysisOptionsImpl(); 969 AnalysisOptionsImpl _options = new AnalysisOptionsImpl();
966 970
971 /// The embedder yaml locator for this context.
972 EmbedderYamlLocator _embedderYamlLocator = new EmbedderYamlLocator(null);
973
967 /** 974 /**
968 * A flag indicating whether errors related to implicitly analyzed sources 975 * A flag indicating whether errors related to implicitly analyzed sources
969 * should be generated and reported. 976 * should be generated and reported.
970 */ 977 */
971 bool _generateImplicitErrors = true; 978 bool _generateImplicitErrors = true;
972 979
973 /** 980 /**
974 * A flag indicating whether errors related to sources in the SDK should be 981 * A flag indicating whether errors related to sources in the SDK should be
975 * generated and reported. 982 * generated and reported.
976 */ 983 */
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 new StreamController<ImplicitAnalysisEvent>.broadcast(); 1156 new StreamController<ImplicitAnalysisEvent>.broadcast();
1150 } 1157 }
1151 1158
1152 @override 1159 @override
1153 AnalysisCache get analysisCache => _cache; 1160 AnalysisCache get analysisCache => _cache;
1154 1161
1155 @override 1162 @override
1156 AnalysisOptions get analysisOptions => _options; 1163 AnalysisOptions get analysisOptions => _options;
1157 1164
1158 @override 1165 @override
1166 EmbedderYamlLocator get embedderYamlLocator => _embedderYamlLocator;
1167
1168 @override
1159 void set analysisOptions(AnalysisOptions options) { 1169 void set analysisOptions(AnalysisOptions options) {
1160 bool needsRecompute = this._options.analyzeFunctionBodiesPredicate != 1170 bool needsRecompute = this._options.analyzeFunctionBodiesPredicate !=
1161 options.analyzeFunctionBodiesPredicate || 1171 options.analyzeFunctionBodiesPredicate ||
1162 this._options.generateImplicitErrors != 1172 this._options.generateImplicitErrors !=
1163 options.generateImplicitErrors || 1173 options.generateImplicitErrors ||
1164 this._options.generateSdkErrors != options.generateSdkErrors || 1174 this._options.generateSdkErrors != options.generateSdkErrors ||
1165 this._options.dart2jsHint != options.dart2jsHint || 1175 this._options.dart2jsHint != options.dart2jsHint ||
1166 (this._options.hint && !options.hint) || 1176 (this._options.hint && !options.hint) ||
1167 this._options.preserveComments != options.preserveComments || 1177 this._options.preserveComments != options.preserveComments ||
1168 this._options.strongMode != options.strongMode || 1178 this._options.strongMode != options.strongMode ||
(...skipping 10944 matching lines...) Expand 10 before | Expand all | Expand 10 after
12113 PendingFuture pendingFuture = 12123 PendingFuture pendingFuture =
12114 new PendingFuture<T>(_context, source, computeValue); 12124 new PendingFuture<T>(_context, source, computeValue);
12115 if (!pendingFuture.evaluate(sourceEntry)) { 12125 if (!pendingFuture.evaluate(sourceEntry)) {
12116 _context._pendingFutureSources 12126 _context._pendingFutureSources
12117 .putIfAbsent(source, () => <PendingFuture>[]) 12127 .putIfAbsent(source, () => <PendingFuture>[])
12118 .add(pendingFuture); 12128 .add(pendingFuture);
12119 } 12129 }
12120 return pendingFuture.future; 12130 return pendingFuture.future;
12121 } 12131 }
12122 } 12132 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698