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

Issue 9410001: restructure string decoding to support iterable use and include benchmarks for UTF-8 decoding. (Closed)

Created:
8 years, 10 months ago by dcarlson
Modified:
8 years, 10 months ago
Reviewers:
ahe, Søren Gjesse, jat
CC:
reviews_dartlang.org, Dan Rice, rchandia, jbrosenberg
Visibility:
Public.

Description

restructure string decoding to support iterable use and include benchmarks for UTF-8 decoding. R=jat@google.com,ahe@google.com,sgjesse@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=4366

Patch Set 1 #

Total comments: 8

Patch Set 2 : "stop using introduced variable _length. Improve docs. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1532 lines, -630 lines) Patch
M utils/string_encoding/unicode.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M utils/string_encoding/unicode_core.dart View 4 chunks +140 lines, -100 lines 0 comments Download
M utils/string_encoding/utf16.dart View 1 4 chunks +220 lines, -138 lines 0 comments Download
M utils/string_encoding/utf32.dart View 1 5 chunks +189 lines, -140 lines 0 comments Download
M utils/string_encoding/utf8_impl.dart View 4 chunks +156 lines, -133 lines 0 comments Download
A utils/tests/string_encoding/benchmark_runner.dart View 1 chunk +459 lines, -0 lines 0 comments Download
M utils/tests/string_encoding/dunit.dart View 2 chunks +6 lines, -4 lines 0 comments Download
M utils/tests/string_encoding/unicode_core_tests.dart View 2 chunks +2 lines, -0 lines 0 comments Download
M utils/tests/string_encoding/unicode_tests.dart View 2 chunks +10 lines, -0 lines 0 comments Download
M utils/tests/string_encoding/utf16_tests.dart View 3 chunks +66 lines, -36 lines 0 comments Download
M utils/tests/string_encoding/utf32_tests.dart View 3 chunks +91 lines, -61 lines 0 comments Download
A utils/tests/string_encoding/utf8_benchmarks.dart View 1 chunk +155 lines, -0 lines 0 comments Download
M utils/tests/string_encoding/utf8_tests.dart View 4 chunks +36 lines, -16 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
dcarlson
8 years, 10 months ago (2012-02-15 16:40:39 UTC) #1
jat
lgtm I'm not sure about the utility of the iterator methods (the cases where it ...
8 years, 10 months ago (2012-02-15 17:26:51 UTC) #2
dcarlson
Thanks for the feedback. https://chromiumcodereview.appspot.com/9410001/diff/1/utils/string_encoding/unicode_core.dart File utils/string_encoding/unicode_core.dart (right): https://chromiumcodereview.appspot.com/9410001/diff/1/utils/string_encoding/unicode_core.dart#newcode222 utils/string_encoding/unicode_core.dart:222: class ListRangeIteratorImpl<T> implements ListRangeIterator<T> { ...
8 years, 10 months ago (2012-02-15 17:31:16 UTC) #3
Søren Gjesse
lgtm https://chromiumcodereview.appspot.com/9410001/diff/1/utils/string_encoding/utf16.dart File utils/string_encoding/utf16.dart (right): https://chromiumcodereview.appspot.com/9410001/diff/1/utils/string_encoding/utf16.dart#newcode25 utils/string_encoding/utf16.dart:25: * Decodes the UTF-16BE bytes as an iterable. ...
8 years, 10 months ago (2012-02-16 15:08:18 UTC) #4
dcarlson
8 years, 10 months ago (2012-02-17 17:32:33 UTC) #5
stoped using introduced variable _length. Improved docs.

https://chromiumcodereview.appspot.com/9410001/diff/1/utils/string_encoding/u...
File utils/string_encoding/utf16.dart (right):

https://chromiumcodereview.appspot.com/9410001/diff/1/utils/string_encoding/u...
utils/string_encoding/utf16.dart:25: * Decodes the UTF-16BE bytes as an
iterable. Thus, the consumer can only convert
On 2012/02/16 15:08:18, Søren Gjesse wrote:
> Long line.
> 
> This is repeated in 3 other places.

Done.

https://chromiumcodereview.appspot.com/9410001/diff/1/utils/string_encoding/u...
utils/string_encoding/utf16.dart:28: * Set the replacementCharacter to null to
throw an IllegalArgumentException
On 2012/02/16 15:08:18, Søren Gjesse wrote:
> replacementCharacter in []s. Maybe also explain the default value for
> replacementCharacter.
> 
> This is repeated in other places.

Done.

https://chromiumcodereview.appspot.com/9410001/diff/1/utils/string_encoding/u...
utils/string_encoding/utf16.dart:241: int _length = length != null ? length :
utf16EncodedBytes.length - offset;
On 2012/02/16 15:08:18, Søren Gjesse wrote:
> Can't you just use length instead of introducing _length?

Done.

Powered by Google App Engine
This is Rietveld 408576698