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

Unified Diff: pkg/compiler/lib/src/kernel/world_builder.dart

Issue 2681783005: Support mixin application equivalence in impact_test. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/compiler/dart2js/kernel/impact_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/world_builder.dart
diff --git a/pkg/compiler/lib/src/kernel/world_builder.dart b/pkg/compiler/lib/src/kernel/world_builder.dart
index aea5bb0a1c9584672b05216ff80256bfd5cbf31c..5c9c84685742013642b24f164b7f0be690310ecf 100644
--- a/pkg/compiler/lib/src/kernel/world_builder.dart
+++ b/pkg/compiler/lib/src/kernel/world_builder.dart
@@ -806,4 +806,19 @@ class WorldDeconstructionForTesting {
KLibrary getLibraryForField(KField field) =>
_getLibrary(field, builder._fieldMap);
+
+ KClass getSuperclassForClass(KClass cls) {
+ KClassEnv env = builder._classEnvs[cls.classIndex];
+ ir.Supertype supertype = env.cls.supertype;
+ if (supertype == null) return null;
+ return builder.getClass(supertype.classNode);
+ }
+
+ InterfaceType getMixinTypeForClass(KClass cls) {
+ KClassEnv env = builder._classEnvs[cls.classIndex];
+ ir.Supertype mixedInType = env.cls.mixedInType;
+ if (mixedInType == null) return null;
+ return builder.createInterfaceType(
+ mixedInType.classNode, mixedInType.typeArguments);
+ }
}
« no previous file with comments | « no previous file | tests/compiler/dart2js/kernel/impact_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698