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

Unified Diff: pkg/compiler/lib/src/common_elements.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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/helpers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common_elements.dart
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart
index 4404b74645f2ea4cc826ce75fdd9cb346dbf6116..760f5d16c2dc7a90abdfcf26d468bf97fe1a9512 100644
--- a/pkg/compiler/lib/src/common_elements.dart
+++ b/pkg/compiler/lib/src/common_elements.dart
@@ -1254,9 +1254,29 @@ abstract class ElementEnvironment {
/// Returns `true` if [cls] is generic.
bool isGenericClass(ClassEntity cls);
+ /// Returns `true` if [cls] is a mixin application (named or unnamed).
+ bool isMixinApplication(ClassEntity cls);
+
/// Returns `true` if [cls] is an unnamed mixin application.
bool isUnnamedMixinApplication(ClassEntity cls);
+ /// Returns the 'effective' mixin class if [cls] is a mixin application, and
+ /// `null` otherwise.
+ ///
+ /// The 'effective' mixin class is the class from which members are mixed in.
+ /// Normally this is the mixin class itself, but not if the mixin class itself
+ /// is a mixin application.
+ ///
+ /// Consider this hierarchy:
+ ///
+ /// class A {}
+ /// class B = Object with A {}
+ /// class C = Object with B {}
+ ///
+ /// The mixin classes of `B` and `C` are `A` and `B`, respectively, but the
+ /// _effective_ mixin class of both is `A`.
+ ClassEntity getEffectiveMixinClass(ClassEntity cls);
+
/// The upper bound on the [typeVariable]. If not explicitly declared, this is
/// `Object`.
DartType getTypeVariableBound(TypeVariableEntity typeVariable);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698