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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/core_patch.dart

Issue 12217115: Revert "Add StringSink and update StringBuffer." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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: sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
index 7d8473f8e2cd2cc0e7df31947bddf4be43cfaeda..09e31da11d0734d44ea381e10de9c76a926089b2 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
@@ -244,25 +244,7 @@ patch bool identical(Object a, Object b) {
}
patch class StringBuffer {
- String _contents = "";
-
- patch StringBuffer([Object content = ""]) {
- if (content is String) {
- _contents = content;
- } else {
- write(content);
- }
- }
-
- patch int get length => _contents.length;
-
- patch void _write(String str) {
- _contents = Primitives.stringConcat(_contents, str);
- }
-
- patch void clear() {
- _contents = "";
+ patch factory StringBuffer([Object content = ""]) {
+ return new JsStringBuffer(content);
}
-
- patch String toString() => _contents;
}

Powered by Google App Engine
This is Rietveld 408576698