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

Unified Diff: sdk/lib/convert/utf.dart

Issue 144473004: Make _Utf8Encoder create its buffer through an external function. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
« no previous file with comments | « sdk/lib/_internal/lib/convert_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/convert/utf.dart
diff --git a/sdk/lib/convert/utf.dart b/sdk/lib/convert/utf.dart
index 8e480f80333904569054ec0557754049fac40049..b24d40e9d960f0c64aec28f84e32f03b8b7eed38 100644
--- a/sdk/lib/convert/utf.dart
+++ b/sdk/lib/convert/utf.dart
@@ -134,7 +134,12 @@ class _Utf8Encoder {
_Utf8Encoder.withBufferSize(int bufferSize)
// TODO(11971, floitsch): use Uint8List instead of normal lists.
floitsch 2014/01/31 13:03:49 Remove TODO.
- : _buffer = new List<int>(bufferSize);
+ : _buffer = _createBuffer(bufferSize);
+
+ /**
+ * Allow an implementation to pick the most efficient way of storing bytes.
floitsch 2014/01/31 13:03:49 Maybe add a TODO(11971): just always use a Uint8Li
+ */
+ external static List<int> _createBuffer(int size);
/**
* Tries to combine the given [leadingSurrogate] with the [nextCodeUnit] and
« no previous file with comments | « sdk/lib/_internal/lib/convert_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698