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

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

Issue 2595583002: Remove StatementType (Closed)
Patch Set: Updated cf. comment Created 4 years 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';
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 return strategy.testElements( 622 return strategy.testElements(
623 type, other, 'element', type.element, other.element) && 623 type, other, 'element', type.element, other.element) &&
624 strategy.testTypeLists(type, other, 'typeArguments', type.typeArguments, 624 strategy.testTypeLists(type, other, 'typeArguments', type.typeArguments,
625 other.typeArguments); 625 other.typeArguments);
626 } 626 }
627 627
628 @override 628 @override
629 bool visitMalformedType(MalformedType type, MalformedType other) => true; 629 bool visitMalformedType(MalformedType type, MalformedType other) => true;
630 630
631 @override 631 @override
632 bool visitStatementType(StatementType type, StatementType other) {
633 throw new UnsupportedError("Unsupported type: $type");
634 }
635
636 @override
637 bool visitTypeVariableType(TypeVariableType type, TypeVariableType other) { 632 bool visitTypeVariableType(TypeVariableType type, TypeVariableType other) {
638 return strategy.testElements( 633 return strategy.testElements(
639 type, other, 'element', type.element, other.element) && 634 type, other, 'element', type.element, other.element) &&
640 strategy.test(type, other, 'is MethodTypeVariableType', 635 strategy.test(type, other, 'is MethodTypeVariableType',
641 type is MethodTypeVariableType, other is MethodTypeVariableType); 636 type is MethodTypeVariableType, other is MethodTypeVariableType);
642 } 637 }
643 638
644 @override 639 @override
645 bool visitVoidType(VoidType type, VoidType argument) => true; 640 bool visitVoidType(VoidType type, VoidType argument) => true;
646 641
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 } 2028 }
2034 2029
2035 bool areMetadataAnnotationsEquivalent( 2030 bool areMetadataAnnotationsEquivalent(
2036 MetadataAnnotation metadata1, MetadataAnnotation metadata2) { 2031 MetadataAnnotation metadata1, MetadataAnnotation metadata2) {
2037 if (metadata1 == metadata2) return true; 2032 if (metadata1 == metadata2) return true;
2038 if (metadata1 == null || metadata2 == null) return false; 2033 if (metadata1 == null || metadata2 == null) return false;
2039 return areElementsEquivalent( 2034 return areElementsEquivalent(
2040 metadata1.annotatedElement, metadata2.annotatedElement) && 2035 metadata1.annotatedElement, metadata2.annotatedElement) &&
2041 areConstantsEquivalent(metadata1.constant, metadata2.constant); 2036 areConstantsEquivalent(metadata1.constant, metadata2.constant);
2042 } 2037 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/kernel.dart ('k') | pkg/compiler/lib/src/serialization/type_serialization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698