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

Unified Diff: pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart

Issue 787233006: dart2js: more uses of the model in the old emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase after revert Created 5 years, 11 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/old_emitter/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/old_emitter/class_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart b/pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart
index 6a8381564379138dd1b8e1aed7cc4575122b3c6f..375be2033372906af9252341cc317028fdbaf528 100644
--- a/pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart
@@ -11,12 +11,11 @@ class ClassEmitter extends CodeEmitterHelper {
/**
* Documentation wanted -- johnniwinther
- *
- * Invariant: [classElement] must be a declaration element.
*/
- void generateClass(ClassElement classElement,
- ClassBuilder properties,
- Map<String, jsAst.Expression> additionalProperties) {
+ void emitClass(Class cls,
+ ClassBuilder enclosingBuilder,
+ Map<String, jsAst.Expression> additionalProperties) {
+ ClassElement classElement = cls.element;
final onlyForRti =
emitter.typeTestRegistry.rtiNeededClasses.contains(classElement);
@@ -32,8 +31,9 @@ class ClassEmitter extends CodeEmitterHelper {
superName = namer.getNameOfClass(superclass);
}
- if (classElement.isMixinApplication) {
- String mixinName = namer.getNameOfClass(computeMixinClass(classElement));
+ if (cls.isMixinApplication) {
+ MixinApplication mixinApplication = cls;
+ String mixinName = mixinApplication.mixinClass.name;
superName = '$superName+$mixinName';
emitter.needsMixinSupport = true;
}
@@ -60,7 +60,7 @@ class ClassEmitter extends CodeEmitterHelper {
emitTypeVariableReaders(classElement, builder);
emitClassBuilderWithReflectionData(
- className, classElement, builder, properties);
+ className, classElement, builder, enclosingBuilder);
}
void emitClassConstructor(ClassElement classElement,
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698