Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(873)

Side by Side Diff: pkg/compiler/lib/src/serialization/equivalence.dart

Issue 2647343003: Update dart2js unit tests to dart_parser and dart_scanner. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/visitor.dart'; 15 import '../elements/visitor.dart';
16 import '../js_backend/backend_serialization.dart' 16 import '../js_backend/backend_serialization.dart'
17 show NativeBehaviorSerialization; 17 show NativeBehaviorSerialization;
18 import '../native/native.dart' show NativeBehavior; 18 import '../native/native.dart' show NativeBehavior;
19 import '../resolution/access_semantics.dart'; 19 import '../resolution/access_semantics.dart';
20 import '../resolution/send_structure.dart'; 20 import '../resolution/send_structure.dart';
21 import '../resolution/tree_elements.dart'; 21 import '../resolution/tree_elements.dart';
22 import '../tokens/token.dart'; 22 import 'package:dart_scanner/dart_scanner.dart';
23 import '../tree/nodes.dart'; 23 import '../tree/nodes.dart';
24 import '../universe/selector.dart'; 24 import '../universe/selector.dart';
25 import '../universe/feature.dart'; 25 import '../universe/feature.dart';
26 import '../universe/use.dart'; 26 import '../universe/use.dart';
27 import '../util/util.dart'; 27 import '../util/util.dart';
28 import 'resolved_ast_serialization.dart'; 28 import 'resolved_ast_serialization.dart';
29 29
30 /// Equality based equivalence function. 30 /// Equality based equivalence function.
31 bool equality(a, b) => a == b; 31 bool equality(a, b) => a == b;
32 32
(...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 } 2045 }
2046 2046
2047 bool areMetadataAnnotationsEquivalent( 2047 bool areMetadataAnnotationsEquivalent(
2048 MetadataAnnotation metadata1, MetadataAnnotation metadata2) { 2048 MetadataAnnotation metadata1, MetadataAnnotation metadata2) {
2049 if (metadata1 == metadata2) return true; 2049 if (metadata1 == metadata2) return true;
2050 if (metadata1 == null || metadata2 == null) return false; 2050 if (metadata1 == null || metadata2 == null) return false;
2051 return areElementsEquivalent( 2051 return areElementsEquivalent(
2052 metadata1.annotatedElement, metadata2.annotatedElement) && 2052 metadata1.annotatedElement, metadata2.annotatedElement) &&
2053 areConstantsEquivalent(metadata1.constant, metadata2.constant); 2053 areConstantsEquivalent(metadata1.constant, metadata2.constant);
2054 } 2054 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698