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

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

Issue 11491005: Fix for Issue 7224 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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'.
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698