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

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

Issue 2996723002: Support typedef type literals (Closed)
Patch Set: Updated cf. comments Created 3 years, 4 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
« no previous file with comments | « pkg/compiler/lib/src/kernel/env.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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';
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 covariant ResolutionVoidType argument) => 705 covariant ResolutionVoidType argument) =>
706 true; 706 true;
707 707
708 @override 708 @override
709 bool visitInterfaceType(covariant ResolutionInterfaceType type, 709 bool visitInterfaceType(covariant ResolutionInterfaceType type,
710 covariant ResolutionInterfaceType other) { 710 covariant ResolutionInterfaceType other) {
711 return visitGenericType(type, other); 711 return visitGenericType(type, other);
712 } 712 }
713 713
714 @override 714 @override
715 bool visitTypedefType( 715 bool visitTypedefType(covariant ResolutionTypedefType type,
716 ResolutionTypedefType type, covariant ResolutionTypedefType other) { 716 covariant ResolutionTypedefType other) {
717 return visitGenericType(type, other); 717 return visitGenericType(type, other);
718 } 718 }
719 } 719 }
720 720
721 /// Visitor that checks for structural equivalence of [ConstantExpression]s. 721 /// Visitor that checks for structural equivalence of [ConstantExpression]s.
722 class ConstantEquivalence 722 class ConstantEquivalence
723 implements ConstantExpressionVisitor<bool, ConstantExpression> { 723 implements ConstantExpressionVisitor<bool, ConstantExpression> {
724 final TestStrategy strategy; 724 final TestStrategy strategy;
725 725
726 const ConstantEquivalence([this.strategy = const TestStrategy()]); 726 const ConstantEquivalence([this.strategy = const TestStrategy()]);
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after
2175 } 2175 }
2176 2176
2177 bool areMetadataAnnotationsEquivalent( 2177 bool areMetadataAnnotationsEquivalent(
2178 MetadataAnnotation metadata1, MetadataAnnotation metadata2) { 2178 MetadataAnnotation metadata1, MetadataAnnotation metadata2) {
2179 if (metadata1 == metadata2) return true; 2179 if (metadata1 == metadata2) return true;
2180 if (metadata1 == null || metadata2 == null) return false; 2180 if (metadata1 == null || metadata2 == null) return false;
2181 return areElementsEquivalent( 2181 return areElementsEquivalent(
2182 metadata1.annotatedElement, metadata2.annotatedElement) && 2182 metadata1.annotatedElement, metadata2.annotatedElement) &&
2183 areConstantsEquivalent(metadata1.constant, metadata2.constant); 2183 areConstantsEquivalent(metadata1.constant, metadata2.constant);
2184 } 2184 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/env.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698