| Index: dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
|
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
|
| index 8957fef843c392eca2d9b9e87cd3b894910b772a..b49617456686a89beb636766260648e9ab569914 100644
|
| --- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
|
| +++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
|
| @@ -289,14 +289,16 @@ function(collectedClasses) {
|
| in the format Super;field1,field2 from the null-string property on the
|
| descriptor. */'''
|
| var fields = desc[''], supr;
|
| - if (typeof fields == 'string') {
|
| - var s = fields.split(';'); supr = s[0];
|
| - fields = s[1] == '' ? [] : s[1].split(',');
|
| + if (typeof fields == "string") {
|
| + var s = fields.split(";");
|
| + supr = s[0];
|
| + fields = s[1] == "" ? [] : s[1].split(",");
|
| } else {
|
| - supr = desc['super'];
|
| + supr = desc.super;
|
| }
|
| $isolatePropertiesName[cls] = $defineClassName(cls, fields, desc);
|
| - if (supr) $pendingClassesName[cls] = supr;
|
| + if (supr)
|
| + $pendingClassesName[cls] = supr;
|
| }
|
| }
|
| var pendingClasses = $pendingClassesName;
|
| @@ -308,11 +310,13 @@ function(collectedClasses) {
|
| '''/* Opera does not support 'getOwnPropertyNames'. Therefore we use
|
| hasOwnProperty instead. */'''
|
| var hasOwnProperty = Object.prototype.hasOwnProperty;
|
| - if (hasOwnProperty.call(finishedClasses, cls)) return;
|
| + if (hasOwnProperty.call(finishedClasses, cls))
|
| + return;
|
| finishedClasses[cls] = true;
|
| var superclass = pendingClasses[cls];
|
| '''/* The superclass is only false (empty string) for Dart's Object class. */'''
|
| - if (!superclass) return;
|
| + if (!superclass)
|
| + return;
|
| finishClass(superclass);
|
| var constructor = $isolatePropertiesName[cls];
|
| var superConstructor = $isolatePropertiesName[superclass];
|
| @@ -321,20 +325,25 @@ function(collectedClasses) {
|
| prototype.__proto__ = superConstructor.prototype;
|
| prototype.constructor = constructor;
|
| } else {
|
| - function tmp() {};
|
| + function tmp() {
|
| + }
|
| tmp.prototype = superConstructor.prototype;
|
| var newPrototype = new tmp();
|
| constructor.prototype = newPrototype;
|
| newPrototype.constructor = constructor;
|
| for (var member in prototype) {
|
| - if (!member) continue; '''/* Short version of: if (member == '') */'''
|
| + if (!member)
|
| + continue;'''/* Short version of: if (member == '') */'''
|
| +
|
| if (hasOwnProperty.call(prototype, member)) {
|
| newPrototype[member] = prototype[member];
|
| }
|
| }
|
| }
|
| }
|
| - for (var cls in pendingClasses) finishClass(cls);
|
| + for (var cls in pendingClasses) {
|
| + finishClass(cls);
|
| + }
|
| }''';
|
| }
|
|
|
|
|