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

Unified Diff: pkg/compiler/lib/src/js_emitter/model.dart

Issue 752553004: dart2js: Support mixins in the new emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 1 month 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/new_emitter/model_emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/model.dart
diff --git a/pkg/compiler/lib/src/js_emitter/model.dart b/pkg/compiler/lib/src/js_emitter/model.dart
index b4b1789afc42463002e790a942415efdfc893f6b..2991db3d601e4891aca7c7ebfd9071889bd60257 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -132,21 +132,27 @@ class StaticField {
class Class {
final String name;
final Holder holder;
- Class superclass;
+ Class _superclass;
final List<Method> methods;
final List<InstanceField> fields;
final bool onlyForRti;
+ final bool isDirectlyInstantiated;
/// Whether the class must be evaluated eagerly.
bool isEager = false;
Class(this.name, this.holder, this.methods, this.fields,
- { this.onlyForRti }) {
+ {this.onlyForRti,
+ this.isDirectlyInstantiated}) {
assert(onlyForRti != null);
+ assert(isDirectlyInstantiated != null);
}
+ bool get isMixinApplication => false;
+ Class get superclass => _superclass;
+
void setSuperclass(Class superclass) {
- this.superclass = superclass;
+ _superclass = superclass;
}
String get superclassName
@@ -155,6 +161,24 @@ class Class {
=> (superclass == null) ? 0 : superclass.holder.index;
}
+class MixinApplication extends Class {
+ Class _mixinClass;
+
+ MixinApplication(String name, Holder holder,
+ {bool onlyForRti,
+ bool isDirectlyInstantiated})
+ : super(name, holder, const <Method>[], const <InstanceField>[],
+ onlyForRti: onlyForRti,
+ isDirectlyInstantiated: isDirectlyInstantiated);
+
+ bool get isMixinApplication => true;
+ Class get mixinClass => _mixinClass;
+
+ void setMixinClass(Class mixinClass) {
+ _mixinClass = mixinClass;
+ }
+}
+
class InstanceField {
final String name;
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698