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/jumps.dart'; |
16 import '../elements/names.dart'; | 17 import '../elements/names.dart'; |
17 import '../elements/types.dart'; | 18 import '../elements/types.dart'; |
18 import '../elements/visitor.dart'; | 19 import '../elements/visitor.dart'; |
19 import '../js_backend/backend_serialization.dart' | 20 import '../js_backend/backend_serialization.dart' |
20 show NativeBehaviorSerialization; | 21 show NativeBehaviorSerialization; |
21 import '../native/native.dart' show NativeBehavior; | 22 import '../native/native.dart' show NativeBehavior; |
22 import '../resolution/access_semantics.dart'; | 23 import '../resolution/access_semantics.dart'; |
23 import '../resolution/send_structure.dart'; | 24 import '../resolution/send_structure.dart'; |
24 import '../resolution/tree_elements.dart'; | 25 import '../resolution/tree_elements.dart'; |
25 import 'package:front_end/src/fasta/scanner.dart'; | 26 import 'package:front_end/src/fasta/scanner.dart'; |
(...skipping 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2134 } | 2135 } |
2135 | 2136 |
2136 bool areMetadataAnnotationsEquivalent( | 2137 bool areMetadataAnnotationsEquivalent( |
2137 MetadataAnnotation metadata1, MetadataAnnotation metadata2) { | 2138 MetadataAnnotation metadata1, MetadataAnnotation metadata2) { |
2138 if (metadata1 == metadata2) return true; | 2139 if (metadata1 == metadata2) return true; |
2139 if (metadata1 == null || metadata2 == null) return false; | 2140 if (metadata1 == null || metadata2 == null) return false; |
2140 return areElementsEquivalent( | 2141 return areElementsEquivalent( |
2141 metadata1.annotatedElement, metadata2.annotatedElement) && | 2142 metadata1.annotatedElement, metadata2.annotatedElement) && |
2142 areConstantsEquivalent(metadata1.constant, metadata2.constant); | 2143 areConstantsEquivalent(metadata1.constant, metadata2.constant); |
2143 } | 2144 } |
OLD | NEW |