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

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: 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..b0820443a763cd6a0833441ac9884cd3bed015fe 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.
ahe 2015/01/15 16:25:10 Is this no longer the case?
floitsch 2015/01/15 16:27:41 It is, but the argument is not provided as argumen
*/
- 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);
@@ -26,14 +25,15 @@ class ClassEmitter extends CodeEmitterHelper {
emitter.needsClassSupport = true;
String className = namer.getNameOfClass(classElement);
- ClassElement superclass = classElement.superclass;
+ Class superclass = cls.superclass;
String superName = "";
if (superclass != null) {
- superName = namer.getNameOfClass(superclass);
+ superName = superclass.name;
}
- 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