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

Issue 11416054: Provide a code point iterator to the String class to simplify iteration. (Closed)

Created:
8 years, 1 month ago by cshapiro
Modified:
8 years, 1 month ago
Reviewers:
siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Provide a code point iterator to the String class to simplify iteration. Committed: https://code.google.com/p/dart/source/detail?r=15109

Patch Set 1 #

Patch Set 2 : remove unintended code #

Total comments: 7

Patch Set 3 : simplify implementation #

Patch Set 4 : address review comments #

Total comments: 2

Patch Set 5 : presubmit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -56 lines) Patch
M runtime/vm/object.h View 1 2 1 chunk +23 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 7 chunks +60 lines, -30 lines 0 comments Download
M runtime/vm/object_test.cc View 1 chunk +55 lines, -0 lines 0 comments Download
M runtime/vm/unicode.h View 1 2 3 4 2 chunks +38 lines, -4 lines 0 comments Download
M runtime/vm/unicode.cc View 1 2 3 9 chunks +18 lines, -22 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
cshapiro
8 years, 1 month ago (2012-11-17 02:25:44 UTC) #1
siva
http://codereview.chromium.org/11416054/diff/7/runtime/vm/object.cc File runtime/vm/object.cc (right): http://codereview.chromium.org/11416054/diff/7/runtime/vm/object.cc#newcode10553 runtime/vm/object.cc:10553: if (Utf16::IsLeadSurrogate(ch) && (index_ != (str_.Length() - 1))) { ...
8 years, 1 month ago (2012-11-19 18:25:29 UTC) #2
cshapiro
http://codereview.chromium.org/11416054/diff/7/runtime/vm/object.cc File runtime/vm/object.cc (right): http://codereview.chromium.org/11416054/diff/7/runtime/vm/object.cc#newcode10553 runtime/vm/object.cc:10553: if (Utf16::IsLeadSurrogate(ch) && (index_ != (str_.Length() - 1))) { ...
8 years, 1 month ago (2012-11-19 18:55:10 UTC) #3
siva
lgtm http://codereview.chromium.org/11416054/diff/3006/runtime/vm/object.cc File runtime/vm/object.cc (right): http://codereview.chromium.org/11416054/diff/3006/runtime/vm/object.cc#newcode10552 runtime/vm/object.cc:10552: int d = (ch_ <= 0xFFFF) ? 1 ...
8 years, 1 month ago (2012-11-19 19:29:54 UTC) #4
cshapiro
8 years, 1 month ago (2012-11-19 19:47:59 UTC) #5
http://codereview.chromium.org/11416054/diff/3006/runtime/vm/object.cc
File runtime/vm/object.cc (right):

http://codereview.chromium.org/11416054/diff/3006/runtime/vm/object.cc#newcod...
runtime/vm/object.cc:10552: int d = (ch_ <= 0xFFFF) ? 1 : 2;
I'll fix that before submitting.

I think we should add predicates for these things... IsBmpCodePoint,
IsSupplementaryCodePoint, etc.

Powered by Google App Engine
This is Rietveld 408576698