| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 /// Functions for asserting equivalence across serialization. | 5 /// Functions for asserting equivalence across serialization. |
| 6 | 6 |
| 7 library dart2js.serialization.equivalence; | 7 library dart2js.serialization.equivalence; |
| 8 | 8 |
| 9 import '../closure.dart'; | 9 import '../closure.dart'; |
| 10 import '../common/resolution.dart'; | 10 import '../common/resolution.dart'; |
| 11 import '../constants/expressions.dart'; | 11 import '../constants/expressions.dart'; |
| 12 import '../constants/values.dart'; | 12 import '../constants/values.dart'; |
| 13 import '../elements/resolution_types.dart'; | 13 import '../elements/resolution_types.dart'; |
| 14 import '../elements/elements.dart'; | 14 import '../elements/elements.dart'; |
| 15 import '../elements/entities.dart'; | 15 import '../elements/entities.dart'; |
| 16 import '../elements/names.dart'; |
| 16 import '../elements/types.dart'; | 17 import '../elements/types.dart'; |
| 17 import '../elements/visitor.dart'; | 18 import '../elements/visitor.dart'; |
| 18 import '../js_backend/backend_serialization.dart' | 19 import '../js_backend/backend_serialization.dart' |
| 19 show NativeBehaviorSerialization; | 20 show NativeBehaviorSerialization; |
| 20 import '../native/native.dart' show NativeBehavior; | 21 import '../native/native.dart' show NativeBehavior; |
| 21 import '../resolution/access_semantics.dart'; | 22 import '../resolution/access_semantics.dart'; |
| 22 import '../resolution/send_structure.dart'; | 23 import '../resolution/send_structure.dart'; |
| 23 import '../resolution/tree_elements.dart'; | 24 import '../resolution/tree_elements.dart'; |
| 24 import 'package:front_end/src/fasta/scanner.dart'; | 25 import 'package:front_end/src/fasta/scanner.dart'; |
| 25 import '../tree/nodes.dart'; | 26 import '../tree/nodes.dart'; |
| (...skipping 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2143 } | 2144 } |
| 2144 | 2145 |
| 2145 bool areMetadataAnnotationsEquivalent( | 2146 bool areMetadataAnnotationsEquivalent( |
| 2146 MetadataAnnotation metadata1, MetadataAnnotation metadata2) { | 2147 MetadataAnnotation metadata1, MetadataAnnotation metadata2) { |
| 2147 if (metadata1 == metadata2) return true; | 2148 if (metadata1 == metadata2) return true; |
| 2148 if (metadata1 == null || metadata2 == null) return false; | 2149 if (metadata1 == null || metadata2 == null) return false; |
| 2149 return areElementsEquivalent( | 2150 return areElementsEquivalent( |
| 2150 metadata1.annotatedElement, metadata2.annotatedElement) && | 2151 metadata1.annotatedElement, metadata2.annotatedElement) && |
| 2151 areConstantsEquivalent(metadata1.constant, metadata2.constant); | 2152 areConstantsEquivalent(metadata1.constant, metadata2.constant); |
| 2152 } | 2153 } |
| OLD | NEW |