| 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 import 'dart:typed_data'; | 9 import 'dart:typed_data'; |
| 10 | 10 |
| (...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1354 * bodies. | 1354 * bodies. |
| 1355 */ | 1355 */ |
| 1356 AnalyzeFunctionBodiesPredicate _analyzeFunctionBodiesPredicate = | 1356 AnalyzeFunctionBodiesPredicate _analyzeFunctionBodiesPredicate = |
| 1357 _analyzeAllFunctionBodies; | 1357 _analyzeAllFunctionBodies; |
| 1358 | 1358 |
| 1359 /** | 1359 /** |
| 1360 * The cached [signature]. | 1360 * The cached [signature]. |
| 1361 */ | 1361 */ |
| 1362 Uint32List _signature; | 1362 Uint32List _signature; |
| 1363 | 1363 |
| 1364 /** |
| 1365 * A flag indicating whether declaration casts are allowed in [strongMode] |
| 1366 * (they are always allowed in Dart 1.0 mode). |
| 1367 * |
| 1368 * This option is experimental and subject to change. |
| 1369 */ |
| 1370 bool declarationCasts = true; |
| 1371 |
| 1364 @override | 1372 @override |
| 1365 @deprecated | 1373 @deprecated |
| 1366 int cacheSize = 64; | 1374 int cacheSize = 64; |
| 1367 | 1375 |
| 1368 @override | 1376 @override |
| 1369 bool dart2jsHint = false; | 1377 bool dart2jsHint = false; |
| 1370 | 1378 |
| 1371 @override | 1379 @override |
| 1372 bool enableAssertInitializer = false; | 1380 bool enableAssertInitializer = false; |
| 1373 | 1381 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1484 errorProcessors = options.errorProcessors; | 1492 errorProcessors = options.errorProcessors; |
| 1485 excludePatterns = options.excludePatterns; | 1493 excludePatterns = options.excludePatterns; |
| 1486 generateImplicitErrors = options.generateImplicitErrors; | 1494 generateImplicitErrors = options.generateImplicitErrors; |
| 1487 generateSdkErrors = options.generateSdkErrors; | 1495 generateSdkErrors = options.generateSdkErrors; |
| 1488 hint = options.hint; | 1496 hint = options.hint; |
| 1489 lint = options.lint; | 1497 lint = options.lint; |
| 1490 lintRules = options.lintRules; | 1498 lintRules = options.lintRules; |
| 1491 preserveComments = options.preserveComments; | 1499 preserveComments = options.preserveComments; |
| 1492 strongMode = options.strongMode; | 1500 strongMode = options.strongMode; |
| 1493 if (options is AnalysisOptionsImpl) { | 1501 if (options is AnalysisOptionsImpl) { |
| 1502 declarationCasts = options.declarationCasts; |
| 1494 strongModeHints = options.strongModeHints; | 1503 strongModeHints = options.strongModeHints; |
| 1495 implicitCasts = options.implicitCasts; | 1504 implicitCasts = options.implicitCasts; |
| 1496 nonnullableTypes = options.nonnullableTypes; | 1505 nonnullableTypes = options.nonnullableTypes; |
| 1497 implicitDynamic = options.implicitDynamic; | 1506 implicitDynamic = options.implicitDynamic; |
| 1498 } | 1507 } |
| 1499 trackCacheDependencies = options.trackCacheDependencies; | 1508 trackCacheDependencies = options.trackCacheDependencies; |
| 1500 disableCacheFlushing = options.disableCacheFlushing; | 1509 disableCacheFlushing = options.disableCacheFlushing; |
| 1501 patchPaths = options.patchPaths; | 1510 patchPaths = options.patchPaths; |
| 1502 } | 1511 } |
| 1503 | 1512 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1600 void set lintRules(List<Linter> rules) { | 1609 void set lintRules(List<Linter> rules) { |
| 1601 _lintRules = rules; | 1610 _lintRules = rules; |
| 1602 } | 1611 } |
| 1603 | 1612 |
| 1604 @override | 1613 @override |
| 1605 Uint32List get signature { | 1614 Uint32List get signature { |
| 1606 if (_signature == null) { | 1615 if (_signature == null) { |
| 1607 ApiSignature buffer = new ApiSignature(); | 1616 ApiSignature buffer = new ApiSignature(); |
| 1608 | 1617 |
| 1609 // Append boolean flags. | 1618 // Append boolean flags. |
| 1619 buffer.addBool(declarationCasts); |
| 1610 buffer.addBool(enableAssertInitializer); | 1620 buffer.addBool(enableAssertInitializer); |
| 1611 buffer.addBool(enableLazyAssignmentOperators); | 1621 buffer.addBool(enableLazyAssignmentOperators); |
| 1612 buffer.addBool(enableStrictCallChecks); | 1622 buffer.addBool(enableStrictCallChecks); |
| 1613 buffer.addBool(enableSuperMixins); | 1623 buffer.addBool(enableSuperMixins); |
| 1614 buffer.addBool(enableUriInPartOf); | 1624 buffer.addBool(enableUriInPartOf); |
| 1615 buffer.addBool(implicitCasts); | 1625 buffer.addBool(implicitCasts); |
| 1616 buffer.addBool(implicitDynamic); | 1626 buffer.addBool(implicitDynamic); |
| 1617 buffer.addBool(strongMode); | 1627 buffer.addBool(strongMode); |
| 1618 buffer.addBool(strongModeHints); | 1628 buffer.addBool(strongModeHints); |
| 1619 | 1629 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1631 | 1641 |
| 1632 // Hash and convert to Uint32List. | 1642 // Hash and convert to Uint32List. |
| 1633 List<int> bytes = buffer.toByteList(); | 1643 List<int> bytes = buffer.toByteList(); |
| 1634 _signature = new Uint8List.fromList(bytes).buffer.asUint32List(); | 1644 _signature = new Uint8List.fromList(bytes).buffer.asUint32List(); |
| 1635 } | 1645 } |
| 1636 return _signature; | 1646 return _signature; |
| 1637 } | 1647 } |
| 1638 | 1648 |
| 1639 @override | 1649 @override |
| 1640 void resetToDefaults() { | 1650 void resetToDefaults() { |
| 1651 declarationCasts = true; |
| 1641 dart2jsHint = false; | 1652 dart2jsHint = false; |
| 1642 disableCacheFlushing = false; | 1653 disableCacheFlushing = false; |
| 1643 enableAssertInitializer = false; | 1654 enableAssertInitializer = false; |
| 1644 enableLazyAssignmentOperators = false; | 1655 enableLazyAssignmentOperators = false; |
| 1645 enableStrictCallChecks = false; | 1656 enableStrictCallChecks = false; |
| 1646 enableSuperMixins = false; | 1657 enableSuperMixins = false; |
| 1647 enableTiming = false; | 1658 enableTiming = false; |
| 1648 enableUriInPartOf = true; | 1659 enableUriInPartOf = true; |
| 1649 _errorProcessors = null; | 1660 _errorProcessors = null; |
| 1650 _excludePatterns = null; | 1661 _excludePatterns = null; |
| (...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2844 */ | 2855 */ |
| 2845 bool get wereSourcesAdded => _changeSet.addedSources.length > 0; | 2856 bool get wereSourcesAdded => _changeSet.addedSources.length > 0; |
| 2846 | 2857 |
| 2847 /** | 2858 /** |
| 2848 * Return `true` if any sources were removed or deleted. | 2859 * Return `true` if any sources were removed or deleted. |
| 2849 */ | 2860 */ |
| 2850 bool get wereSourcesRemoved => | 2861 bool get wereSourcesRemoved => |
| 2851 _changeSet.removedSources.length > 0 || | 2862 _changeSet.removedSources.length > 0 || |
| 2852 _changeSet.removedContainers.length > 0; | 2863 _changeSet.removedContainers.length > 0; |
| 2853 } | 2864 } |
| OLD | NEW |