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

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

Issue 11415114: Do not generate empty native classes. Fixes issue 6872. (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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart (revision 15255)
+++ sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart (working copy)
@@ -133,17 +133,20 @@
buffer.add(' }');
}
- void emitClassFields(ClassElement classElement, CodeBuffer buffer) {
- /* Do nothing. */
+ void emitClassFields(ClassElement classElement,
+ CodeBuffer buffer,
+ bool emitEndingComma) {
+ if (emitEndingComma) buffer.add(', ');
}
- void emitClassGettersSetters(ClassElement classElement, CodeBuffer buffer,
- {bool omitLeadingComma: false}) {
+ void emitClassGettersSetters(ClassElement classElement,
+ CodeBuffer buffer,
+ bool emitLeadingComma) {
emitComma() {
- if (!omitLeadingComma) {
+ if (emitLeadingComma) {
buffer.add(",\n ");
} else {
- omitLeadingComma = false;
+ emitLeadingComma = true;
}
}

Powered by Google App Engine
This is Rietveld 408576698