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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 ReferenceFinder referenceFinder = new ReferenceFinder(callback); | 411 ReferenceFinder referenceFinder = new ReferenceFinder(callback); |
412 if (constant is ParameterElement) { | 412 if (constant is ParameterElement) { |
413 if (constant.initializer != null) { | 413 if (constant.initializer != null) { |
414 Expression defaultValue = | 414 Expression defaultValue = |
415 (constant as ConstVariableElement).constantInitializer; | 415 (constant as ConstVariableElement).constantInitializer; |
416 if (defaultValue != null) { | 416 if (defaultValue != null) { |
417 defaultValue.accept(referenceFinder); | 417 defaultValue.accept(referenceFinder); |
418 } | 418 } |
419 } | 419 } |
420 } else if (constant is PotentiallyConstVariableElement) { | 420 } else if (constant is PotentiallyConstVariableElement) { |
421 constant.constantInitializer.accept(referenceFinder); | 421 Expression initializer = constant.constantInitializer; |
| 422 if (initializer != null) { |
| 423 initializer.accept(referenceFinder); |
| 424 } |
422 } else if (constant is ConstructorElementImpl) { | 425 } else if (constant is ConstructorElementImpl) { |
423 constant.isCycleFree = false; | 426 constant.isCycleFree = false; |
424 ConstructorElement redirectedConstructor = | 427 ConstructorElement redirectedConstructor = |
425 getConstRedirectedConstructor(constant); | 428 getConstRedirectedConstructor(constant); |
426 if (redirectedConstructor != null) { | 429 if (redirectedConstructor != null) { |
427 ConstructorElement redirectedConstructorBase = | 430 ConstructorElement redirectedConstructorBase = |
428 ConstantEvaluationEngine._getConstructorBase(redirectedConstructor); | 431 ConstantEvaluationEngine._getConstructorBase(redirectedConstructor); |
429 callback(redirectedConstructorBase); | 432 callback(redirectedConstructorBase); |
430 return; | 433 return; |
431 } else if (constant.isFactory) { | 434 } else if (constant.isFactory) { |
(...skipping 4785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5217 return BoolState.from(_element == rightElement); | 5220 return BoolState.from(_element == rightElement); |
5218 } else if (rightOperand is DynamicState) { | 5221 } else if (rightOperand is DynamicState) { |
5219 return BoolState.UNKNOWN_VALUE; | 5222 return BoolState.UNKNOWN_VALUE; |
5220 } | 5223 } |
5221 return BoolState.FALSE_STATE; | 5224 return BoolState.FALSE_STATE; |
5222 } | 5225 } |
5223 | 5226 |
5224 @override | 5227 @override |
5225 String toString() => _element == null ? "-unknown-" : _element.name; | 5228 String toString() => _element == null ? "-unknown-" : _element.name; |
5226 } | 5229 } |
OLD | NEW |