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

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

Issue 11316146: Fix unit tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | « no previous file | 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 part of js_backend; 5 part of js_backend;
6 6
7 /** 7 /**
8 * A function element that represents a closure call. The signature is copied 8 * A function element that represents a closure call. The signature is copied
9 * from the given element. 9 * from the given element.
10 */ 10 */
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 buffer.addCharCode(GETTER_CODE + flag); 883 buffer.addCharCode(GETTER_CODE + flag);
884 } else if (needsSetter) { 884 } else if (needsSetter) {
885 buffer.addCharCode(SETTER_CODE + flag); 885 buffer.addCharCode(SETTER_CODE + flag);
886 } 886 }
887 buffer.add('"'); 887 buffer.add('"');
888 }); 888 });
889 if (!isFirstField) { 889 if (!isFirstField) {
890 // There was at least one field. 890 // There was at least one field.
891 buffer.add(']'); 891 buffer.add(']');
892 if (emitEndingComma) { 892 if (emitEndingComma) {
893 buffer.add(', '); 893 buffer.add(',');
894 } 894 }
895 } 895 }
896 } 896 }
897 897
898 /** Each getter/setter must be prefixed with a ",\n ". */ 898 /** Each getter/setter must be prefixed with a ",\n ". */
899 void emitClassGettersSetters(ClassElement classElement, 899 void emitClassGettersSetters(ClassElement classElement,
900 CodeBuffer buffer, 900 CodeBuffer buffer,
901 bool emitLeadingComma) { 901 bool emitLeadingComma) {
902 visitClassFields(classElement, (Element member, 902 visitClassFields(classElement, (Element member,
903 String name, 903 String name,
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 const String HOOKS_API_USAGE = """ 1756 const String HOOKS_API_USAGE = """
1757 // Generated by dart2js, the Dart to JavaScript compiler. 1757 // Generated by dart2js, the Dart to JavaScript compiler.
1758 // The code supports the following hooks: 1758 // The code supports the following hooks:
1759 // dartPrint(message) - if this function is defined it is called 1759 // dartPrint(message) - if this function is defined it is called
1760 // instead of the Dart [print] method. 1760 // instead of the Dart [print] method.
1761 // dartMainRunner(main) - if this function is defined, the Dart [main] 1761 // dartMainRunner(main) - if this function is defined, the Dart [main]
1762 // method will not be invoked directly. 1762 // method will not be invoked directly.
1763 // Instead, a closure that will invoke [main] is 1763 // Instead, a closure that will invoke [main] is
1764 // passed to [dartMainRunner]. 1764 // passed to [dartMainRunner].
1765 """; 1765 """;
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/class_codegen_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698