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

Unified Diff: tests/compiler/dart2js/serialization_test_helper.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/serialization_helper.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/serialization_test_helper.dart
diff --git a/tests/compiler/dart2js/serialization_test_helper.dart b/tests/compiler/dart2js/serialization_test_helper.dart
index b2c72917cad3217310773cf90635217126eb343b..4ee842de3f6ac012e3e748a767915331f31a2ad7 100644
--- a/tests/compiler/dart2js/serialization_test_helper.dart
+++ b/tests/compiler/dart2js/serialization_test_helper.dart
@@ -294,9 +294,20 @@ void checkLoadedLibraryMembers(
if (member1.isClass && member2.isClass) {
ClassElement class1 = member1;
ClassElement class2 = member2;
+ if (!class1.isResolved) return;
+
class1.forEachLocalMember((m1) {
- checkMembers(m1, class2.lookupLocalMember(m1.name));
+ checkMembers(m1, class2.localLookup(m1.name));
});
+ ClassElement superclass1 = class1.superclass;
+ ClassElement superclass2 = class2.superclass;
+ while (superclass1 != null && superclass1.isUnnamedMixinApplication) {
+ for (ConstructorElement c1 in superclass1.constructors) {
+ checkMembers(c1, superclass2.lookupConstructor(c1.name));
+ }
+ superclass1 = superclass1.superclass;
+ superclass2 = superclass2.superclass;
+ }
return;
}
@@ -305,7 +316,7 @@ void checkLoadedLibraryMembers(
}
if (member2 == null) {
- return;
+ throw 'Missing member for ${member1}';
}
if (areElementsEquivalent(member1, member2)) {
@@ -348,14 +359,20 @@ void checkImpacts(Compiler compiler1, Element member1,
Compiler compiler2, Element member2,
{bool verbose: false}) {
ResolutionImpact impact1 = compiler1.resolution.getResolutionImpact(member1);
- ResolutionImpact impact2 =
- compiler2.serialization.deserializer.getResolutionImpact(member2);
+ ResolutionImpact impact2 = compiler2.resolution.getResolutionImpact(member2);
- if (impact1 == null || impact2 == null) return;
+ if (impact1 == null && impact2 == null) return;
if (verbose) {
print('Checking impacts for $member1 vs $member2');
}
+ if (impact1 == null) {
+ throw 'Missing impact for $member1. $member2 has $impact2';
+ }
+ if (impact2 == null) {
+ throw 'Missing impact for $member2. $member1 has $impact1';
+ }
+
testResolutionImpactEquivalence(impact1, impact2, const CheckStrategy());
}
« no previous file with comments | « tests/compiler/dart2js/serialization_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698