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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart

Issue 25657008: Only have one method for generating a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart b/dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart
index a49ea1a15cce0d433f6a1ce516d49b00cf902078..5a19e8905ace22b77421f84055f056994f1e47b0 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart
@@ -21,4 +21,11 @@ class ClassBuilder {
jsAst.Expression toObjectInitializer() {
return new jsAst.ObjectInitializer(properties);
}
+
+ void writeOn(CodeBuffer buffer, Compiler compiler, String separatedBy) {
sra1 2013/10/02 16:10:52 I'm not sure I like writeOn - we have missing sour
ahe 2013/10/02 16:58:05 Agreed. I should add a comment making it clear tha
+ for (jsAst.Property property in properties) {
+ if (!buffer.isEmpty) buffer.write(separatedBy);
+ buffer.write(jsAst.prettyPrint(property, compiler));
+ }
+ }
}

Powered by Google App Engine
This is Rietveld 408576698