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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 12212064: Null diff to AST based version of finishClasses. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ }
}''';
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698