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

Issue 11438046: Cleanup StringCharacterStream and add initial test cases. (Closed)

Created:
8 years ago by drcarney
Modified:
8 years ago
Reviewers:
Yang
CC:
Yang
Visibility:
Public.

Description

Cleanup StringCharacterStream and add initial test cases. BUG= Committed: https://code.google.com/p/v8/source/detail?r=13189

Patch Set 1 #

Patch Set 2 : GCC warning fix #

Patch Set 3 : Added random tests #

Patch Set 4 : gcc fixes #

Patch Set 5 : fix handle madness #

Patch Set 6 : some cleanup #

Patch Set 7 : gc fix #

Patch Set 8 : SlicedStrings added to tests #

Total comments: 20

Patch Set 9 : Cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+511 lines, -145 lines) Patch
M src/objects.h View 3 chunks +7 lines, -10 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 2 chunks +49 lines, -56 lines 0 comments Download
M src/objects-inl.h View 1 2 3 9 chunks +24 lines, -53 lines 0 comments Download
M test/cctest/test-strings.cc View 1 2 3 4 5 6 7 8 10 chunks +431 lines, -26 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
drcarney
switched a bunch of variable cases added back some of the test optimized away the ...
8 years ago (2012-12-06 13:21:05 UTC) #1
Yang
LGTM, but I have a bunch of comments. A lot of them are formatting-related, some ...
8 years ago (2012-12-10 13:45:29 UTC) #2
drcarney
8 years ago (2012-12-11 10:08:24 UTC) #3
https://codereview.chromium.org/11438046/diff/13002/test/cctest/test-strings.cc
File test/cctest/test-strings.cc (right):

https://codereview.chromium.org/11438046/diff/13002/test/cctest/test-strings....
test/cctest/test-strings.cc:19: class RandomNumberGenerator {
On 2012/12/10 13:45:29, Yang wrote:
> You could also make a thin wrapper around v8's RNG. See v8.cc, seed_random,
> random_base and V8::Random. I'd be fine with this implementation too though.

Okay. I'll clean it up in another cl. I see that the contents of seed_random are
copied all over the place in the test dir.  Maybe I can put a rng class in
cctest.h? Incidentally, this implementation is actually slightly better than the
fast implementation in v8.cc, which is why I went with it.

https://codereview.chromium.org/11438046/diff/13002/test/cctest/test-strings....
test/cctest/test-strings.cc:140: slice_head_chars = rng->next(15);
On 2012/12/10 13:45:29, Yang wrote:
> you could avoid the while loop if you just add 1 to the random number.

I want to allow at most one of the slices to be zero, but if they are both set
it doesn't matter.

Powered by Google App Engine
This is Rietveld 408576698