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

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

Issue 1901683002: Support deserialization of ResolutionImpact for members of unnamed mixin applications (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 '../common/resolution.dart'; 9 import '../common/resolution.dart';
10 import '../constants/expressions.dart'; 10 import '../constants/expressions.dart';
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 strategy.testSets(impact1, impact2, 'staticUses', impact1.staticUses, 746 strategy.testSets(impact1, impact2, 'staticUses', impact1.staticUses,
747 impact2.staticUses, areStaticUsesEquivalent) && 747 impact2.staticUses, areStaticUsesEquivalent) &&
748 strategy.testSets(impact1, impact2, 'typeUses', impact1.typeUses, 748 strategy.testSets(impact1, impact2, 'typeUses', impact1.typeUses,
749 impact2.typeUses, areTypeUsesEquivalent); 749 impact2.typeUses, areTypeUsesEquivalent);
750 } 750 }
751 751
752 /// Tests the equivalence of [resolvedAst1] and [resolvedAst2] using [strategy]. 752 /// Tests the equivalence of [resolvedAst1] and [resolvedAst2] using [strategy].
753 bool testResolvedAstEquivalence( 753 bool testResolvedAstEquivalence(
754 ResolvedAst resolvedAst1, ResolvedAst resolvedAst2, 754 ResolvedAst resolvedAst1, ResolvedAst resolvedAst2,
755 [TestStrategy strategy = const TestStrategy()]) { 755 [TestStrategy strategy = const TestStrategy()]) {
756 if (!strategy.test(resolvedAst1, resolvedAst1, 'kind', resolvedAst1.kind,
757 resolvedAst2.kind)) {
758 return false;
759 }
760 if (resolvedAst1.kind != ResolvedAstKind.PARSED) {
761 // Nothing more to check.
762 return true;
763 }
756 return strategy.testElements(resolvedAst1, resolvedAst2, 'element', 764 return strategy.testElements(resolvedAst1, resolvedAst2, 'element',
757 resolvedAst1.element, resolvedAst2.element) && 765 resolvedAst1.element, resolvedAst2.element) &&
758 new NodeEquivalenceVisitor(strategy).testNodes(resolvedAst1, resolvedAst2, 766 new NodeEquivalenceVisitor(strategy).testNodes(resolvedAst1, resolvedAst2,
759 'node', resolvedAst1.node, resolvedAst2.node) && 767 'node', resolvedAst1.node, resolvedAst2.node) &&
760 testTreeElementsEquivalence(resolvedAst1, resolvedAst2, strategy); 768 testTreeElementsEquivalence(resolvedAst1, resolvedAst2, strategy);
761 } 769 }
762 770
763 /// Tests the equivalence of the data stored in the [TreeElements] of 771 /// Tests the equivalence of the data stored in the [TreeElements] of
764 /// [resolvedAst1] and [resolvedAst2] using [strategy]. 772 /// [resolvedAst1] and [resolvedAst2] using [strategy].
765 bool testTreeElementsEquivalence( 773 bool testTreeElementsEquivalence(
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 @override 1695 @override
1688 bool visitStatement(Statement node1, Statement node2) { 1696 bool visitStatement(Statement node1, Statement node2) {
1689 throw new UnsupportedError('Unexpected nodes: $node1 <> $node2'); 1697 throw new UnsupportedError('Unexpected nodes: $node1 <> $node2');
1690 } 1698 }
1691 1699
1692 @override 1700 @override
1693 bool visitStringNode(StringNode node1, StringNode node2) { 1701 bool visitStringNode(StringNode node1, StringNode node2) {
1694 throw new UnsupportedError('Unexpected nodes: $node1 <> $node2'); 1702 throw new UnsupportedError('Unexpected nodes: $node1 <> $node2');
1695 } 1703 }
1696 } 1704 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/registry.dart ('k') | pkg/compiler/lib/src/serialization/impact_serialization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698