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

Issue 1594017: Flatten before String::WriteUtf8 (Closed)

Created:
10 years, 8 months ago by ry
Modified:
9 years, 7 months ago
Reviewers:
antonm
CC:
v8-dev
Visibility:
Public.

Description

Flatten before String::WriteUtf8

Patch Set 1 #

Patch Set 2 : Flatten strings after first write #

Patch Set 3 : Add String::Flatten() API #

Total comments: 5

Patch Set 4 : Add isDeadCheck and isFlat tests #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -0 lines) Patch
M include/v8.h View 1 chunk +7 lines, -0 lines 0 comments Download
M src/api.cc View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M test/cctest/test-strings.cc View 3 1 chunk +32 lines, -0 lines 3 comments Download

Messages

Total messages: 7 (0 generated)
ry
Flattening the string before doing the WriteUtf8 speeds up some of my tests significantly. (Granted, ...
10 years, 8 months ago (2010-04-06 06:04:51 UTC) #1
antonm
I believe it was me who removed this flattening, see http://code.google.com/p/v8/source/detail?r=2999 The idea was that ...
10 years, 8 months ago (2010-04-06 10:38:54 UTC) #2
ry
On 2010/04/06 10:38:54, antonm wrote: > I believe it was me who removed this flattening, ...
10 years, 8 months ago (2010-04-06 16:59:02 UTC) #3
antonm
http://codereview.chromium.org/1594017/diff/8001/9002 File src/api.cc (right): http://codereview.chromium.org/1594017/diff/8001/9002#newcode2731 src/api.cc:2731: EnsureInitialized("v8::String::Flatten()"); I'd add ON_BAILOUT as well (or IsDeadCheck) as ...
10 years, 8 months ago (2010-04-07 11:37:11 UTC) #4
ry
I addressed these issues.
10 years, 8 months ago (2010-04-07 18:58:44 UTC) #5
antonm
Thanks a lot, Ryan. LGTM and I going to land it, but there are some ...
10 years, 8 months ago (2010-04-08 11:23:41 UTC) #6
ry
10 years, 8 months ago (2010-04-08 14:11:02 UTC) #7
On 2010/04/08 11:23:41, antonm wrote:
> Thanks a lot, Ryan.
> 
> LGTM and I going to land it, but there are some small amendments I could do on
> landing.

Thanks!

> http://codereview.chromium.org/1594017/diff/5002/14003
> File test/cctest/test-strings.cc (right):
> 
> http://codereview.chromium.org/1594017/diff/5002/14003#newcode360
> test/cctest/test-strings.cc:360: CHECK_EQ(false, str->IsFlat());
> would you mind if I change that to CHECK(!str->IsFlat())?
>
> http://codereview.chromium.org/1594017/diff/5002/14003#newcode364
> test/cctest/test-strings.cc:364: CHECK_EQ(true, str->IsFlat());
> would you mind if I change that to CHECK(str->IsFlat())?

That's fine
 
> http://codereview.chromium.org/1594017/diff/5002/14003#newcode369
> test/cctest/test-strings.cc:369: for (int j = 0; j < 10; j++) {
> why j, not i? :)  I could change to i when landing or could keep your j, up to
> you.

Oh, I just changed that when I discovered the i:: internal namespace alias. It
can be changed back.

Powered by Google App Engine
This is Rietveld 408576698