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

Side by Side Diff: dart/lib/compiler/implementation/js_backend/emitter.dart

Issue 10898030: Put "super" in quotes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase. Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « AUTHORS ('k') | dart/tests/compiler/dart2js/class_codegen_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * A function element that represents a closure call. The signature is copied 6 * A function element that represents a closure call. The signature is copied
7 * from the given element. 7 * from the given element.
8 */ 8 */
9 class ClosureInvocationElement extends FunctionElement { 9 class ClosureInvocationElement extends FunctionElement {
10 ClosureInvocationElement(SourceString name, 10 ClosureInvocationElement(SourceString name,
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 } 560 }
561 String constructorName = namer.safeName(classElement.name.slowToString()); 561 String constructorName = namer.safeName(classElement.name.slowToString());
562 562
563 buffer.add('$classesCollector.$className = {"":\n'); 563 buffer.add('$classesCollector.$className = {"":\n');
564 buffer.add(' ['); 564 buffer.add(' [');
565 emitClassFields(classElement, buffer); 565 emitClassFields(classElement, buffer);
566 buffer.add('],\n'); 566 buffer.add('],\n');
567 // TODO(floitsch): the emitInstanceMember should simply always emit a ',\n'. 567 // TODO(floitsch): the emitInstanceMember should simply always emit a ',\n'.
568 // That does currently not work because the native classes have a different 568 // That does currently not work because the native classes have a different
569 // syntax. 569 // syntax.
570 buffer.add(' super: "$superName"'); 570 buffer.add(' "super": "$superName"');
571 emitInstanceMembers(classElement, buffer, true); 571 emitInstanceMembers(classElement, buffer, true);
572 buffer.add('\n};\n\n'); 572 buffer.add('\n};\n\n');
573 } 573 }
574 574
575 void generateTypeTests(ClassElement cls, 575 void generateTypeTests(ClassElement cls,
576 void generateTypeTest(ClassElement element)) { 576 void generateTypeTest(ClassElement element)) {
577 if (compiler.codegenWorld.isChecks.contains(cls)) { 577 if (compiler.codegenWorld.isChecks.contains(cls)) {
578 generateTypeTest(cls); 578 generateTypeTest(cls);
579 } 579 }
580 generateInterfacesIsTests(cls, generateTypeTest, new Set<Element>()); 580 generateInterfacesIsTests(cls, generateTypeTest, new Set<Element>());
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 sourceName = token.slowToString(); 1167 sourceName = token.slowToString();
1168 } 1168 }
1169 int totalOffset = bufferOffset + offset; 1169 int totalOffset = bufferOffset + offset;
1170 sourceMapBuilder.addMapping( 1170 sourceMapBuilder.addMapping(
1171 sourceFile, token.charOffset, sourceName, totalOffset); 1171 sourceFile, token.charOffset, sourceName, totalOffset);
1172 }); 1172 });
1173 } 1173 }
1174 } 1174 }
1175 1175
1176 typedef void DefineMemberFunction(String invocationName, CodeBuffer definition); 1176 typedef void DefineMemberFunction(String invocationName, CodeBuffer definition);
OLDNEW
« no previous file with comments | « AUTHORS ('k') | dart/tests/compiler/dart2js/class_codegen_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698