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 analyzer.src.generated.engine; | 5 library analyzer.src.generated.engine; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 | 9 |
10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 * context. | 1054 * context. |
1055 */ | 1055 */ |
1056 abstract class AnalysisOptions { | 1056 abstract class AnalysisOptions { |
1057 /** | 1057 /** |
1058 * Function that returns `true` if analysis is to parse and analyze function | 1058 * Function that returns `true` if analysis is to parse and analyze function |
1059 * bodies for a given source. | 1059 * bodies for a given source. |
1060 */ | 1060 */ |
1061 AnalyzeFunctionBodiesPredicate get analyzeFunctionBodiesPredicate; | 1061 AnalyzeFunctionBodiesPredicate get analyzeFunctionBodiesPredicate; |
1062 | 1062 |
1063 /** | 1063 /** |
1064 * Return the maximum number of sources for which AST structures should be | 1064 * DEPRECATED: Return the maximum number of sources for which AST structures s
hould be |
1065 * kept in the cache. | 1065 * kept in the cache. |
| 1066 * |
| 1067 * This setting no longer has any effect. |
1066 */ | 1068 */ |
| 1069 @deprecated |
1067 int get cacheSize; | 1070 int get cacheSize; |
1068 | 1071 |
1069 /** | 1072 /** |
1070 * Return `true` if analysis is to generate dart2js related hint results. | 1073 * Return `true` if analysis is to generate dart2js related hint results. |
1071 */ | 1074 */ |
1072 bool get dart2jsHint; | 1075 bool get dart2jsHint; |
1073 | 1076 |
1074 /** | 1077 /** |
1075 * Return `true` if cache flushing should be disabled. Setting this option to | 1078 * Return `true` if cache flushing should be disabled. Setting this option to |
1076 * `true` can improve analysis speed at the expense of memory usage. It may | 1079 * `true` can improve analysis speed at the expense of memory usage. It may |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1218 */ | 1221 */ |
1219 void setCrossContextOptionsFrom(AnalysisOptions options); | 1222 void setCrossContextOptionsFrom(AnalysisOptions options); |
1220 } | 1223 } |
1221 | 1224 |
1222 /** | 1225 /** |
1223 * A set of analysis options used to control the behavior of an analysis | 1226 * A set of analysis options used to control the behavior of an analysis |
1224 * context. | 1227 * context. |
1225 */ | 1228 */ |
1226 class AnalysisOptionsImpl implements AnalysisOptions { | 1229 class AnalysisOptionsImpl implements AnalysisOptions { |
1227 /** | 1230 /** |
1228 * The maximum number of sources for which data should be kept in the cache. | 1231 * DEPRECATED: The maximum number of sources for which data should be kept in
the cache. |
| 1232 * |
| 1233 * This constant no longer has any effect. |
1229 */ | 1234 */ |
| 1235 @deprecated |
1230 static const int DEFAULT_CACHE_SIZE = 64; | 1236 static const int DEFAULT_CACHE_SIZE = 64; |
1231 | 1237 |
1232 static const int ENABLE_ASSERT_FLAG = 0x01; | 1238 static const int ENABLE_ASSERT_FLAG = 0x01; |
1233 static const int ENABLE_GENERIC_METHODS_FLAG = 0x02; | 1239 static const int ENABLE_GENERIC_METHODS_FLAG = 0x02; |
1234 static const int ENABLE_STRICT_CALL_CHECKS_FLAG = 0x04; | 1240 static const int ENABLE_STRICT_CALL_CHECKS_FLAG = 0x04; |
1235 static const int ENABLE_STRONG_MODE_FLAG = 0x08; | 1241 static const int ENABLE_STRONG_MODE_FLAG = 0x08; |
1236 static const int ENABLE_STRONG_MODE_HINTS_FLAG = 0x10; | 1242 static const int ENABLE_STRONG_MODE_HINTS_FLAG = 0x10; |
1237 static const int ENABLE_SUPER_MIXINS_FLAG = 0x20; | 1243 static const int ENABLE_SUPER_MIXINS_FLAG = 0x20; |
1238 | 1244 |
1239 /** | 1245 /** |
1240 * The default list of non-nullable type names. | 1246 * The default list of non-nullable type names. |
1241 */ | 1247 */ |
1242 static const List<String> NONNULLABLE_TYPES = const <String>[]; | 1248 static const List<String> NONNULLABLE_TYPES = const <String>[]; |
1243 | 1249 |
1244 /** | 1250 /** |
1245 * A predicate indicating whether analysis is to parse and analyze function | 1251 * A predicate indicating whether analysis is to parse and analyze function |
1246 * bodies. | 1252 * bodies. |
1247 */ | 1253 */ |
1248 AnalyzeFunctionBodiesPredicate _analyzeFunctionBodiesPredicate = | 1254 AnalyzeFunctionBodiesPredicate _analyzeFunctionBodiesPredicate = |
1249 _analyzeAllFunctionBodies; | 1255 _analyzeAllFunctionBodies; |
1250 | 1256 |
1251 @override | 1257 @override |
| 1258 @deprecated |
1252 int cacheSize = DEFAULT_CACHE_SIZE; | 1259 int cacheSize = DEFAULT_CACHE_SIZE; |
1253 | 1260 |
1254 @override | 1261 @override |
1255 bool dart2jsHint = false; | 1262 bool dart2jsHint = false; |
1256 | 1263 |
1257 @override | 1264 @override |
1258 bool enableAssertInitializer = false; | 1265 bool enableAssertInitializer = false; |
1259 | 1266 |
1260 @override | 1267 @override |
1261 bool enableAssertMessage = false; | 1268 bool enableAssertMessage = false; |
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2686 * The data that was created from the source. | 2693 * The data that was created from the source. |
2687 */ | 2694 */ |
2688 final E data; | 2695 final E data; |
2689 | 2696 |
2690 /** | 2697 /** |
2691 * Initialize a newly created holder to associate the given [data] with the | 2698 * Initialize a newly created holder to associate the given [data] with the |
2692 * given [modificationTime]. | 2699 * given [modificationTime]. |
2693 */ | 2700 */ |
2694 TimestampedData(this.modificationTime, this.data); | 2701 TimestampedData(this.modificationTime, this.data); |
2695 } | 2702 } |
OLD | NEW |