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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 * [ConstantEvaluationTarget]. | 893 * [ConstantEvaluationTarget]. |
894 */ | 894 */ |
895 class ConstantEvaluationTarget_Annotation implements ConstantEvaluationTarget { | 895 class ConstantEvaluationTarget_Annotation implements ConstantEvaluationTarget { |
896 final AnalysisContext context; | 896 final AnalysisContext context; |
897 final Source source; | 897 final Source source; |
898 final Source librarySource; | 898 final Source librarySource; |
899 final Annotation annotation; | 899 final Annotation annotation; |
900 | 900 |
901 ConstantEvaluationTarget_Annotation( | 901 ConstantEvaluationTarget_Annotation( |
902 this.context, this.source, this.librarySource, this.annotation); | 902 this.context, this.source, this.librarySource, this.annotation); |
| 903 |
| 904 @override |
| 905 int get hashCode => JenkinsSmiHash.hash4(context.hashCode, source.hashCode, |
| 906 librarySource.hashCode, annotation.hashCode); |
| 907 |
| 908 @override |
| 909 bool operator ==(other) { |
| 910 if (other is ConstantEvaluationTarget_Annotation) { |
| 911 return this.context == other.context && |
| 912 this.source == other.source && |
| 913 this.librarySource == other.librarySource && |
| 914 this.annotation == other.annotation; |
| 915 } else { |
| 916 return false; |
| 917 } |
| 918 } |
903 } | 919 } |
904 | 920 |
905 /** | 921 /** |
906 * Interface used by unit tests to verify correct dependency analysis during | 922 * Interface used by unit tests to verify correct dependency analysis during |
907 * constant evaluation. | 923 * constant evaluation. |
908 */ | 924 */ |
909 abstract class ConstantEvaluationValidator { | 925 abstract class ConstantEvaluationValidator { |
910 /** | 926 /** |
911 * This method is called just before computing the constant value associated | 927 * This method is called just before computing the constant value associated |
912 * with [constant]. Unit tests will override this method to introduce | 928 * with [constant]. Unit tests will override this method to introduce |
(...skipping 4277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5190 return BoolState.from(_element == rightElement); | 5206 return BoolState.from(_element == rightElement); |
5191 } else if (rightOperand is DynamicState) { | 5207 } else if (rightOperand is DynamicState) { |
5192 return BoolState.UNKNOWN_VALUE; | 5208 return BoolState.UNKNOWN_VALUE; |
5193 } | 5209 } |
5194 return BoolState.FALSE_STATE; | 5210 return BoolState.FALSE_STATE; |
5195 } | 5211 } |
5196 | 5212 |
5197 @override | 5213 @override |
5198 String toString() => _element == null ? "-unknown-" : _element.name; | 5214 String toString() => _element == null ? "-unknown-" : _element.name; |
5199 } | 5215 } |
OLD | NEW |