Index: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
index 4d25e3a6beee49848c4bc94adbf2546da46d74ba..fdc41f1279bdd9062388948f8f23a21f33b3687f 100644 |
--- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
@@ -219,8 +219,11 @@ function(collectedClasses) { |
var desc = collectedClasses[cls]; |
'''/* Get the superclass and the fields in the format Super;field1,field2 from |
ngeoffray
2012/12/09 10:41:50
Update the comment?
|
the null-string property on the descriptor. */''' |
- var s = desc[''].split(';'), supr = s[0]; |
- var fields = s[1] == '' ? [] : s[1].split(','); |
+ var fields = desc[''], supr = desc['super']; |
ngeoffray
2012/12/09 10:41:50
why not put "supr = desc['super']" in an else bran
|
+ if (typeof fields=='string') { |
ngeoffray
2012/12/09 10:41:50
spaces between '=='
|
+ var s = fields.split(';'); supr = s[0]; |
+ fields = s[1] == '' ? [] : s[1].split(','); |
+ } |
$isolatePropertiesName[cls] = $defineClassName(cls, fields, desc); |
if (supr) $pendingClassesName[cls] = supr; |
} |
@@ -833,6 +836,10 @@ $lazyInitializerLogic |
/* Do nothing. */ |
} |
+ void emitSuper(String superName, CodeBuffer buffer) { |
+ /* Do nothing. */ |
+ } |
+ |
void emitClassFields(ClassElement classElement, |
CodeBuffer buffer, |
bool emitEndingComma, |
@@ -964,6 +971,7 @@ $lazyInitializerLogic |
buffer.add('$classesCollector.$className = {'); |
emitClassConstructor(classElement, buffer); |
+ emitSuper(superName, buffer); |
emitClassFields(classElement, buffer, false, |
superClass: superName, isNative: false); |
// TODO(floitsch): the emitInstanceMember should simply always emit a ',\n'. |