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

Issue 9038: Create an abstraction for the string type flags so that they can be cached.... (Closed)

Created:
12 years, 1 month ago by Erik Corry
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Create an abstraction for the string type flags so that they can be cached. Read the objects.h change first to understand what's going on here. Committed: http://code.google.com/p/v8/source/detail?r=675

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+826 lines, -564 lines) Patch
M src/api.cc View 3 chunks +6 lines, -4 lines 0 comments Download
M src/bootstrapper.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/codegen.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M src/compiler.cc View 3 chunks +9 lines, -5 lines 1 comment Download
M src/conversions.cc View 4 chunks +15 lines, -9 lines 1 comment Download
M src/factory.h View 1 chunk +7 lines, -2 lines 0 comments Download
M src/factory.cc View 1 chunk +14 lines, -6 lines 1 comment Download
M src/handles.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M src/heap.h View 3 chunks +12 lines, -3 lines 0 comments Download
M src/heap.cc View 9 chunks +61 lines, -40 lines 2 comments Download
M src/jsregexp.cc View 2 chunks +20 lines, -16 lines 0 comments Download
M src/log.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M src/objects.h View 13 chunks +75 lines, -57 lines 4 comments Download
M src/objects.cc View 45 chunks +192 lines, -149 lines 2 comments Download
M src/objects-debug.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M src/objects-inl.h View 8 chunks +189 lines, -141 lines 1 comment Download
M src/parser.cc View 3 chunks +7 lines, -5 lines 0 comments Download
M src/prettyprinter.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M src/property.h View 1 chunk +1 line, -1 line 0 comments Download
M src/runtime.cc View 32 chunks +144 lines, -89 lines 5 comments Download
M test/cctest/test-heap.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M test/cctest/test-strings.cc View 12 chunks +46 lines, -18 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Erik Corry
12 years, 1 month ago (2008-11-03 08:05:47 UTC) #1
Mads Ager (chromium)
LGTM with a bunch of nits. Does this lint? http://codereview.chromium.org/9038/diff/1/11 File src/compiler.cc (right): http://codereview.chromium.org/9038/diff/1/11#newcode160 Line ...
12 years, 1 month ago (2008-11-03 08:45:48 UTC) #2
Erik Corry
12 years, 1 month ago (2008-11-03 09:33:54 UTC) #3
Thanks for the feedback.

http://codereview.chromium.org/9038/diff/1/8
File src/objects.cc (right):

http://codereview.chromium.org/9038/diff/1/8#newcode2915
Line 2915: return true;
On 2008/11/03 08:45:49, Mads Ager wrote:
> Doesn't it make sense to check that the representation tag makes sense?

It makes no sense because all bit combinations are valid.

http://codereview.chromium.org/9038/diff/1/13
File src/objects.h (right):

http://codereview.chromium.org/9038/diff/1/13#newcode3026
Line 3026: // string can potentially alter its shape.
On 2008/11/03 08:45:49, Mads Ager wrote:
> Would it make sense to put in some debug code that adds a valid_ member to the
> StringShape class and sets it to false when flattened?  Then each of the
> operations can assert that the shape is valid which could potentially catch
> nasty bugs.

At the moment the flatten operation doesn't actually change the shape, though
this is in the works :-)  I put in the scaffolding for the check, but at the
moment it's not used.

http://codereview.chromium.org/9038/diff/1/12
File src/runtime.cc (right):

http://codereview.chromium.org/9038/diff/1/12#newcode2187
Line 2187: StringShape dshape(destination);
On 2008/11/03 08:45:49, Mads Ager wrote:
> dest_shape or even destination_shape?

I changed the other one, but I left this in, because the 80 character limit
means that this code gets very much less readable with dest_shape.

Powered by Google App Engine
This is Rietveld 408576698