| 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 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 | 1184 |
| 1185 static const int ENABLE_ASSERT_FLAG = 0x01; | 1185 static const int ENABLE_ASSERT_FLAG = 0x01; |
| 1186 static const int ENABLE_ASYNC_FLAG = 0x02; | 1186 static const int ENABLE_ASYNC_FLAG = 0x02; |
| 1187 static const int ENABLE_GENERIC_METHODS_FLAG = 0x04; | 1187 static const int ENABLE_GENERIC_METHODS_FLAG = 0x04; |
| 1188 static const int ENABLE_STRICT_CALL_CHECKS_FLAG = 0x08; | 1188 static const int ENABLE_STRICT_CALL_CHECKS_FLAG = 0x08; |
| 1189 static const int ENABLE_STRONG_MODE_FLAG = 0x10; | 1189 static const int ENABLE_STRONG_MODE_FLAG = 0x10; |
| 1190 static const int ENABLE_STRONG_MODE_HINTS_FLAG = 0x20; | 1190 static const int ENABLE_STRONG_MODE_HINTS_FLAG = 0x20; |
| 1191 static const int ENABLE_SUPER_MIXINS_FLAG = 0x40; | 1191 static const int ENABLE_SUPER_MIXINS_FLAG = 0x40; |
| 1192 | 1192 |
| 1193 /** | 1193 /** |
| 1194 * The default list of non-nullable type names. |
| 1195 */ |
| 1196 static const List<String> NONNULLABLE_TYPES = const <String>[]; |
| 1197 |
| 1198 /** |
| 1194 * A predicate indicating whether analysis is to parse and analyze function | 1199 * A predicate indicating whether analysis is to parse and analyze function |
| 1195 * bodies. | 1200 * bodies. |
| 1196 */ | 1201 */ |
| 1197 AnalyzeFunctionBodiesPredicate _analyzeFunctionBodiesPredicate = | 1202 AnalyzeFunctionBodiesPredicate _analyzeFunctionBodiesPredicate = |
| 1198 _analyzeAllFunctionBodies; | 1203 _analyzeAllFunctionBodies; |
| 1199 | 1204 |
| 1200 /** | 1205 /** |
| 1201 * The maximum number of sources for which AST structures should be kept in | 1206 * The maximum number of sources for which AST structures should be kept in |
| 1202 * the cache. | 1207 * the cache. |
| 1203 */ | 1208 */ |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1327 * This flag can be used without necessarily enabling [strongMode], but it is | 1332 * This flag can be used without necessarily enabling [strongMode], but it is |
| 1328 * designed with strong mode's type inference in mind. Without type inference, | 1333 * designed with strong mode's type inference in mind. Without type inference, |
| 1329 * it will raise many errors. Also it does not provide type safety without | 1334 * it will raise many errors. Also it does not provide type safety without |
| 1330 * strong mode. | 1335 * strong mode. |
| 1331 * | 1336 * |
| 1332 * This option is experimental and subject to change. | 1337 * This option is experimental and subject to change. |
| 1333 */ | 1338 */ |
| 1334 bool implicitDynamic = true; | 1339 bool implicitDynamic = true; |
| 1335 | 1340 |
| 1336 /** | 1341 /** |
| 1337 * The default list of non-nullable type names. | |
| 1338 */ | |
| 1339 static const List<String> NONNULLABLE_TYPES = const <String>[]; | |
| 1340 | |
| 1341 /** | |
| 1342 * Initialize a newly created set of analysis options to have their default | 1342 * Initialize a newly created set of analysis options to have their default |
| 1343 * values. | 1343 * values. |
| 1344 */ | 1344 */ |
| 1345 AnalysisOptionsImpl(); | 1345 AnalysisOptionsImpl(); |
| 1346 | 1346 |
| 1347 /** | 1347 /** |
| 1348 * Initialize a newly created set of analysis options to have the same values | 1348 * Initialize a newly created set of analysis options to have the same values |
| 1349 * as those in the given set of analysis [options]. | 1349 * as those in the given set of analysis [options]. |
| 1350 */ | 1350 */ |
| 1351 AnalysisOptionsImpl.from(AnalysisOptions options) { | 1351 AnalysisOptionsImpl.from(AnalysisOptions options) { |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1553 final bool hasChanges; | 1553 final bool hasChanges; |
| 1554 | 1554 |
| 1555 ApplyChangesStatus(this.hasChanges); | 1555 ApplyChangesStatus(this.hasChanges); |
| 1556 } | 1556 } |
| 1557 | 1557 |
| 1558 /** | 1558 /** |
| 1559 * Statistics about cache consistency validation. | 1559 * Statistics about cache consistency validation. |
| 1560 */ | 1560 */ |
| 1561 class CacheConsistencyValidationStatistics { | 1561 class CacheConsistencyValidationStatistics { |
| 1562 /** | 1562 /** |
| 1563 * Number of sources which were modified, but the context was not notified | 1563 * Number of sources which were changed, but the context was not notified |
| 1564 * about it, so this fact was detected only during cache consistency | 1564 * about it, so this fact was detected only during cache consistency |
| 1565 * validation. | 1565 * validation. |
| 1566 */ | 1566 */ |
| 1567 int numOfModified = 0; | 1567 int numOfChanged = 0; |
| 1568 | 1568 |
| 1569 /** | 1569 /** |
| 1570 * Number of sources which were deleted, but the context was not notified | 1570 * Number of sources which stopped existing, but the context was not notified |
| 1571 * about it, so this fact was detected only during cache consistency | 1571 * about it, so this fact was detected only during cache consistency |
| 1572 * validation. | 1572 * validation. |
| 1573 */ | 1573 */ |
| 1574 int numOfDeleted = 0; | 1574 int numOfRemoved = 0; |
| 1575 |
| 1576 /** |
| 1577 * Reset all counters. |
| 1578 */ |
| 1579 void reset() { |
| 1580 numOfChanged = 0; |
| 1581 numOfRemoved = 0; |
| 1582 } |
| 1575 } | 1583 } |
| 1576 | 1584 |
| 1577 /** | 1585 /** |
| 1578 * Interface for cache consistency validation in an [InternalAnalysisContext]. | 1586 * Interface for cache consistency validation in an [InternalAnalysisContext]. |
| 1579 */ | 1587 */ |
| 1580 abstract class CacheConsistencyValidator { | 1588 abstract class CacheConsistencyValidator { |
| 1581 /** | 1589 /** |
| 1582 * Return sources for which the contexts needs to know modification times. | 1590 * Return sources for which the contexts needs to know modification times. |
| 1583 */ | 1591 */ |
| 1584 List<Source> getSourcesToComputeModificationTimes(); | 1592 List<Source> getSourcesToComputeModificationTimes(); |
| (...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2724 * The data that was created from the source. | 2732 * The data that was created from the source. |
| 2725 */ | 2733 */ |
| 2726 final E data; | 2734 final E data; |
| 2727 | 2735 |
| 2728 /** | 2736 /** |
| 2729 * Initialize a newly created holder to associate the given [data] with the | 2737 * Initialize a newly created holder to associate the given [data] with the |
| 2730 * given [modificationTime]. | 2738 * given [modificationTime]. |
| 2731 */ | 2739 */ |
| 2732 TimestampedData(this.modificationTime, this.data); | 2740 TimestampedData(this.modificationTime, this.data); |
| 2733 } | 2741 } |
| OLD | NEW |