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

Unified Diff: sdk/lib/core/string_buffer.dart

Issue 12421002: Change VM's string-buffer patch to use a Uin16Array as backing buffer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Made Uint16Array.ByteAddr public and used that to get address of code units. Created 7 years, 9 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/core/string_buffer.dart
diff --git a/sdk/lib/core/string_buffer.dart b/sdk/lib/core/string_buffer.dart
index 07d3277066e8832c6077c805a8ed37aee8ebe77d..47fc8db65d58b4eb88421760b3120eed32053cb9 100644
--- a/sdk/lib/core/string_buffer.dart
+++ b/sdk/lib/core/string_buffer.dart
@@ -31,8 +31,12 @@ class StringBuffer implements StringSink {
@deprecated
void add(Object obj) => write(obj);
+ /// Adds the contents of [obj], converted to a string, to the buffer.
external void write(Object obj);
+ /// Adds the string representation of [charCode] to the buffer.
+ external void writeCharCode(int charCode);
+
void writeAll(Iterable objects) {
for (Object obj in objects) write(obj);
}
@@ -52,11 +56,6 @@ class StringBuffer implements StringSink {
writeCharCode(charCode);
}
- /// Adds the string representation of [charCode] to the buffer.
- void writeCharCode(int charCode) {
- write(new String.fromCharCode(charCode));
- }
-
/**
* Adds all items in [objects] to the buffer.
*
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/core_patch.dart ('k') | tests/corelib/string_buffer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698