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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart

Issue 2689303003: Implement type variables in mixin applications. (Closed)
Patch Set: Restore duplication handling and set mixedInType. 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
Index: pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
index 2f810ea10359405134478dfcd02a3b7fe549b51f..9f9ea415e093af3528dc0c4d772a87d29c5fda5e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
@@ -92,7 +92,7 @@ class KernelLibraryBuilder
KernelTypeBuilder addMixinApplication(KernelTypeBuilder supertype,
List<KernelTypeBuilder> mixins, int charOffset) {
KernelTypeBuilder type = new KernelMixinApplicationBuilder(
- supertype, mixins, charOffset, fileUri);
+ supertype, mixins, this, charOffset, fileUri);
return addType(type);
}
@@ -225,23 +225,6 @@ class KernelLibraryBuilder
if (builder is SourceClassBuilder) {
Class cls = builder.build(this);
library.addClass(cls);
- Class superclass = cls.superclass;
- if (superclass != null && superclass.isMixinApplication) {
- List<Class> mixinApplications = <Class>[];
- mixinApplicationClasses.add(cls);
- while (superclass != null && superclass.isMixinApplication) {
- if (superclass.parent == null) {
- mixinApplications.add(superclass);
- }
- superclass = superclass.superclass;
- }
- for (Class cls in mixinApplications.reversed) {
- // TODO(ahe): Should be able to move this into the above loop as long
- // as we don't care about matching dartk perfectly.
- library.addClass(cls);
- mixinApplicationClasses.add(cls);
- }
- }
} else if (builder is KernelFieldBuilder) {
library.addMember(builder.build(library)..isStatic = true);
} else if (builder is KernelProcedureBuilder) {

Powered by Google App Engine
This is Rietveld 408576698