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

Unified Diff: runtime/bin/string_stream.dart

Issue 10379018: Revert "Revert "Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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: runtime/bin/string_stream.dart
diff --git a/runtime/bin/string_stream.dart b/runtime/bin/string_stream.dart
index 06c31a0b6cb55d7892df3845b48fd59830c38939..16ba1a7c3462fb72877a3d1225f4d4a5732d998c 100644
--- a/runtime/bin/string_stream.dart
+++ b/runtime/bin/string_stream.dart
@@ -239,7 +239,7 @@ interface _StringEncoder {
class _UTF8Encoder implements _StringEncoder {
List<int> encodeString(String string) {
int size = _encodingSize(string);
- ByteArray result = new ByteArray(size);
+ List<int> result = new Uint8List(size);
_encodeString(string, result);
return result;
}
@@ -286,7 +286,7 @@ class _UTF8Encoder implements _StringEncoder {
// Utility class for encoding a string into a Latin1 byte stream.
class _Latin1Encoder implements _StringEncoder {
List<int> encodeString(String string) {
- ByteArray result = new ByteArray(string.length);
+ List<int> result = new Uint8List(string.length);
for (int i = 0; i < string.length; i++) {
int charCode = string.charCodeAt(i);
if (charCode > 255) {
@@ -303,7 +303,7 @@ class _Latin1Encoder implements _StringEncoder {
// Utility class for encoding a string into an ASCII byte stream.
class _AsciiEncoder implements _StringEncoder {
List<int> encodeString(String string) {
- ByteArray result = new ByteArray(string.length);
+ List<int> result = new Uint8List(string.length);
for (int i = 0; i < string.length; i++) {
int charCode = string.charCodeAt(i);
if (charCode > 127) {

Powered by Google App Engine
This is Rietveld 408576698