| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.constant; | 8 library engine.constant; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 constant.constantInitializer.accept(referenceFinder); | 420 constant.constantInitializer.accept(referenceFinder); |
| 421 } else if (constant is ConstructorElementImpl) { | 421 } else if (constant is ConstructorElementImpl) { |
| 422 constant.isCycleFree = false; | 422 constant.isCycleFree = false; |
| 423 ConstructorElement redirectedConstructor = | 423 ConstructorElement redirectedConstructor = |
| 424 getConstRedirectedConstructor(constant); | 424 getConstRedirectedConstructor(constant); |
| 425 if (redirectedConstructor != null) { | 425 if (redirectedConstructor != null) { |
| 426 ConstructorElement redirectedConstructorBase = | 426 ConstructorElement redirectedConstructorBase = |
| 427 ConstantEvaluationEngine._getConstructorBase(redirectedConstructor); | 427 ConstantEvaluationEngine._getConstructorBase(redirectedConstructor); |
| 428 callback(redirectedConstructorBase); | 428 callback(redirectedConstructorBase); |
| 429 return; | 429 return; |
| 430 } else if (constant.isFactory) { |
| 431 // Factory constructor, but getConstRedirectedConstructor returned |
| 432 // null. This can happen if we're visiting one of the special external |
| 433 // const factory constructors in the SDK, or if the code contains |
| 434 // errors (such as delegating to a non-const constructor, or delegating |
| 435 // to a constructor that can't be resolved). In any of these cases, |
| 436 // we'll evaluate calls to this constructor without having to refer to |
| 437 // any other constants. So we don't need to report any dependencies. |
| 438 return; |
| 430 } | 439 } |
| 431 bool superInvocationFound = false; | 440 bool superInvocationFound = false; |
| 432 List<ConstructorInitializer> initializers = constant.constantInitializers; | 441 List<ConstructorInitializer> initializers = constant.constantInitializers; |
| 433 for (ConstructorInitializer initializer in initializers) { | 442 for (ConstructorInitializer initializer in initializers) { |
| 434 if (initializer is SuperConstructorInvocation) { | 443 if (initializer is SuperConstructorInvocation) { |
| 435 superInvocationFound = true; | 444 superInvocationFound = true; |
| 436 } | 445 } |
| 437 initializer.accept(referenceFinder); | 446 initializer.accept(referenceFinder); |
| 438 } | 447 } |
| 439 if (!superInvocationFound) { | 448 if (!superInvocationFound) { |
| (...skipping 4766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5206 return BoolState.from(_element == rightElement); | 5215 return BoolState.from(_element == rightElement); |
| 5207 } else if (rightOperand is DynamicState) { | 5216 } else if (rightOperand is DynamicState) { |
| 5208 return BoolState.UNKNOWN_VALUE; | 5217 return BoolState.UNKNOWN_VALUE; |
| 5209 } | 5218 } |
| 5210 return BoolState.FALSE_STATE; | 5219 return BoolState.FALSE_STATE; |
| 5211 } | 5220 } |
| 5212 | 5221 |
| 5213 @override | 5222 @override |
| 5214 String toString() => _element == null ? "-unknown-" : _element.name; | 5223 String toString() => _element == null ? "-unknown-" : _element.name; |
| 5215 } | 5224 } |
| OLD | NEW |