Chromium Code Reviews| 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 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1296 bool trackCacheDependencies = true; | 1296 bool trackCacheDependencies = true; |
| 1297 | 1297 |
| 1298 /** | 1298 /** |
| 1299 * A flag indicating whether implicit casts are allowed in [strongMode] | 1299 * A flag indicating whether implicit casts are allowed in [strongMode] |
| 1300 * (they are always allowed in Dart 1.0 mode). | 1300 * (they are always allowed in Dart 1.0 mode). |
| 1301 * | 1301 * |
| 1302 * This option is experimental and subject to change. | 1302 * This option is experimental and subject to change. |
| 1303 */ | 1303 */ |
| 1304 bool implicitCasts = true; | 1304 bool implicitCasts = true; |
| 1305 | 1305 |
| 1306 /** | |
| 1307 * A list of non-nullable type names (e.g., 'int', 'bool', etc.). | |
| 1308 */ | |
| 1309 List<String> nonnullableTypes = NONNULLABLE_TYPES; | |
|
Brian Wilkerson
2016/08/02 15:04:36
Is it the case that the type names in this list wi
stanm
2016/08/02 16:56:05
Good point! As John suggested, I will add the pref
| |
| 1310 static const List<String> NONNULLABLE_TYPES = const <String>[]; | |
|
Brian Wilkerson
2016/08/02 15:04:36
nit: we auto-format and auto-sort our source files
stanm
2016/08/02 16:56:05
Thanks! I'm already using `dartfmt` for formatting
| |
| 1311 | |
| 1306 @override | 1312 @override |
| 1307 bool finerGrainedInvalidation = false; | 1313 bool finerGrainedInvalidation = false; |
| 1308 | 1314 |
| 1309 /** | 1315 /** |
| 1310 * A flag indicating whether implicit dynamic type is allowed, on by default. | 1316 * A flag indicating whether implicit dynamic type is allowed, on by default. |
| 1311 * | 1317 * |
| 1312 * This flag can be used without necessarily enabling [strongMode], but it is | 1318 * This flag can be used without necessarily enabling [strongMode], but it is |
| 1313 * designed with strong mode's type inference in mind. Without type inference, | 1319 * designed with strong mode's type inference in mind. Without type inference, |
| 1314 * it will raise many errors. Also it does not provide type safety without | 1320 * it will raise many errors. Also it does not provide type safety without |
| 1315 * strong mode. | 1321 * strong mode. |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 1343 hint = options.hint; | 1349 hint = options.hint; |
| 1344 incremental = options.incremental; | 1350 incremental = options.incremental; |
| 1345 incrementalApi = options.incrementalApi; | 1351 incrementalApi = options.incrementalApi; |
| 1346 incrementalValidation = options.incrementalValidation; | 1352 incrementalValidation = options.incrementalValidation; |
| 1347 lint = options.lint; | 1353 lint = options.lint; |
| 1348 preserveComments = options.preserveComments; | 1354 preserveComments = options.preserveComments; |
| 1349 strongMode = options.strongMode; | 1355 strongMode = options.strongMode; |
| 1350 if (options is AnalysisOptionsImpl) { | 1356 if (options is AnalysisOptionsImpl) { |
| 1351 strongModeHints = options.strongModeHints; | 1357 strongModeHints = options.strongModeHints; |
| 1352 implicitCasts = options.implicitCasts; | 1358 implicitCasts = options.implicitCasts; |
| 1359 nonnullableTypes = options.nonnullableTypes; | |
| 1353 implicitDynamic = options.implicitDynamic; | 1360 implicitDynamic = options.implicitDynamic; |
| 1354 } | 1361 } |
| 1355 trackCacheDependencies = options.trackCacheDependencies; | 1362 trackCacheDependencies = options.trackCacheDependencies; |
| 1356 finerGrainedInvalidation = options.finerGrainedInvalidation; | 1363 finerGrainedInvalidation = options.finerGrainedInvalidation; |
| 1357 } | 1364 } |
| 1358 | 1365 |
| 1359 bool get analyzeFunctionBodies { | 1366 bool get analyzeFunctionBodies { |
| 1360 if (identical(analyzeFunctionBodiesPredicate, _analyzeAllFunctionBodies)) { | 1367 if (identical(analyzeFunctionBodiesPredicate, _analyzeAllFunctionBodies)) { |
| 1361 return true; | 1368 return true; |
| 1362 } else if (identical( | 1369 } else if (identical( |
| (...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2703 * The data that was created from the source. | 2710 * The data that was created from the source. |
| 2704 */ | 2711 */ |
| 2705 final E data; | 2712 final E data; |
| 2706 | 2713 |
| 2707 /** | 2714 /** |
| 2708 * Initialize a newly created holder to associate the given [data] with the | 2715 * Initialize a newly created holder to associate the given [data] with the |
| 2709 * given [modificationTime]. | 2716 * given [modificationTime]. |
| 2710 */ | 2717 */ |
| 2711 TimestampedData(this.modificationTime, this.data); | 2718 TimestampedData(this.modificationTime, this.data); |
| 2712 } | 2719 } |
| OLD | NEW |