Index: pkg/compiler/lib/src/js_emitter/program_builder/collector.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart b/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart |
index e69fb2746af4c897a962cbc5ef9afc5e04af1598..f298bbe499a3c3985b8b23a585b67d347d92dcb2 100644 |
--- a/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart |
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart |
@@ -229,12 +229,10 @@ class Collector { |
addClassesWithSuperclasses(instantiatedClasses); |
// 2. Add all classes used as mixins. |
- Set<ClassEntity> mixinClasses = new Set<ClassEntity>(); |
- for (ClassEntity cls in neededClasses) { |
- _elementEnvironment.forEachMixin(cls, (ClassEntity mixinClass) { |
- mixinClasses.add(mixinClass); |
- }); |
- } |
+ Set<ClassEntity> mixinClasses = neededClasses |
+ .where(_elementEnvironment.isMixinApplication) |
+ .map(_elementEnvironment.getEffectiveMixinClass) |
+ .toSet(); |
neededClasses.addAll(mixinClasses); |
// 3. Find all classes needed for rti. |