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

Unified Diff: runtime/bin/string_stream.dart

Issue 8506005: Merge the two buffer list implementations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from ager@ Created 9 years, 1 month 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 | « runtime/bin/socket_stream.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/string_stream.dart
diff --git a/runtime/bin/string_stream.dart b/runtime/bin/string_stream.dart
index 9c7f82f9e9f05e40e6b677f55d833765686b55b8..eb0c04ff51ff6a1265faad204fd24982acf804f1 100644
--- a/runtime/bin/string_stream.dart
+++ b/runtime/bin/string_stream.dart
@@ -2,38 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// Utility class which can deliver bytes one by one from a number of
-// buffers added.
-class _BufferList {
- _BufferList() : _index = 0, _length = 0, _buffers = new Queue();
-
- void add(List<int> buffer) {
- _buffers.addLast(buffer);
- _length += buffer.length;
- }
-
- int peek() {
- return _buffers.first()[_index];
- }
-
- int next() {
- int value = _buffers.first()[_index++];
- _length--;
- if (_index == _buffers.first().length) {
- _buffers.removeFirst();
- _index = 0;
- }
- return value;
- }
-
- int get length() => _length;
-
- int _length;
- Queue<List<int>> _buffers;
- int _index;
-}
-
-
// Interface for decoders decoding binary data into objects of type T.
interface _Decoder<T> {
// Add more binary data to be decoded. The ownership of the buffer
« no previous file with comments | « runtime/bin/socket_stream.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698