| Index: sdk/lib/_internal/compiler/implementation/code_buffer.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/code_buffer.dart b/sdk/lib/_internal/compiler/implementation/code_buffer.dart
|
| index 69fab9ae5ffd0a5d63ad071257cefff44c553857..4c0a1fe18c0efddc2b4039cd84a54190af215804 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/code_buffer.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/code_buffer.dart
|
| @@ -37,9 +37,19 @@ class CodeBuffer implements StringBuffer {
|
| return this;
|
| }
|
|
|
| - CodeBuffer writeAll(Iterable<Object> objects) {
|
| - for (var object in objects) {
|
| - write(object);
|
| + CodeBuffer writeAll(Iterable<Object> objects, [String separator = ""]) {
|
| + Iterator iterator = objects.iterator;
|
| + if (!iterator.moveNext()) return this;
|
| + if (separator == "") {
|
| + do {
|
| + write(iterator.current);
|
| + } while (iterator.moveNext());
|
| + } else {
|
| + buffer.write(iterator.current);
|
| + while (iterator.moveNext()) {
|
| + write(separator);
|
| + write(iterator.current);
|
| + }
|
| }
|
| return this;
|
| }
|
|
|