| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 """; |
| OLD | NEW |