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

Unified Diff: pkg/compiler/lib/src/js_emitter/program_builder/collector.dart

Issue 2936063002: Handle named mixin application in emitter (Closed)
Patch Set: Created 3 years, 6 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/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.
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/js_emitter.dart ('k') | pkg/compiler/lib/src/js_emitter/program_builder/field_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698