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

Issue 6966041: Add complete ElementKind information directly to Map for objects with elements. (Closed)

Created:
9 years, 7 months ago by danno
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Add complete ElementsKind information directly to Map for objects with elements. Committed: http://code.google.com/p/v8/source/detail?r=8162

Patch Set 1 #

Patch Set 2 : implement all platforms #

Total comments: 10

Patch Set 3 : review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -94 lines) Patch
M src/arm/full-codegen-arm.cc View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M src/arm/ic-arm.cc View 1 2 1 chunk +2 lines, -5 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M src/heap.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M src/ia32/ic-ia32.cc View 1 2 1 chunk +2 lines, -5 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 4 chunks +41 lines, -26 lines 0 comments Download
M src/objects.cc View 1 2 2 chunks +37 lines, -2 lines 0 comments Download
M src/objects-inl.h View 1 2 3 chunks +11 lines, -41 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M src/x64/ic-x64.cc View 1 2 1 chunk +2 lines, -5 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
danno
please review
9 years, 7 months ago (2011-05-27 11:39:13 UTC) #1
Mads Ager (chromium)
LGTM with a couple of nits. http://codereview.chromium.org/6966041/diff/2002/src/arm/macro-assembler-arm.cc File src/arm/macro-assembler-arm.cc (right): http://codereview.chromium.org/6966041/diff/2002/src/arm/macro-assembler-arm.cc#newcode1683 src/arm/macro-assembler-arm.cc:1683: cmp(scratch, Operand(Map::kMaximumBitField2FastElementValue)); Can ...
9 years, 6 months ago (2011-05-30 11:14:24 UTC) #2
danno
9 years, 6 months ago (2011-06-01 22:29:54 UTC) #3
feedback addressed and will commit

http://codereview.chromium.org/6966041/diff/2002/src/arm/macro-assembler-arm.cc
File src/arm/macro-assembler-arm.cc (right):

http://codereview.chromium.org/6966041/diff/2002/src/arm/macro-assembler-arm....
src/arm/macro-assembler-arm.cc:1683: cmp(scratch,
Operand(Map::kMaximumBitField2FastElementValue));
On 2011/05/30 11:14:24, Mads Ager wrote:
> Can we add some sort of STATIC_ASSERT here that will trigger if we change the
> order of stuff so that it will no longer be safe to only check the top value?
> 
> Something like FAST_ELEMENTS == 0?

Done.

http://codereview.chromium.org/6966041/diff/2002/src/ia32/ic-ia32.cc
File src/ia32/ic-ia32.cc (right):

http://codereview.chromium.org/6966041/diff/2002/src/ia32/ic-ia32.cc#newcode487
src/ia32/ic-ia32.cc:487: // Check if receiver's map to see if it has fast
elements.
On 2011/05/30 11:14:24, Mads Ager wrote:
> if receiver's -> the receiver's

Done.

http://codereview.chromium.org/6966041/diff/2002/src/ia32/macro-assembler-ia3...
File src/ia32/macro-assembler-ia32.cc (right):

http://codereview.chromium.org/6966041/diff/2002/src/ia32/macro-assembler-ia3...
src/ia32/macro-assembler-ia32.cc:285: // Check the "has fast elements" bit in
the receiver's map.
On 2011/05/30 11:14:24, Mads Ager wrote:
> Remove comment here? Seems redundant with the comment in the header file?

Done.

http://codereview.chromium.org/6966041/diff/2002/src/objects.h
File src/objects.h (right):

http://codereview.chromium.org/6966041/diff/2002/src/objects.h#newcode3763
src/objects.h:3763: (elements_kind << kElementsKindFirstBit));
On 2011/05/30 11:14:24, Mads Ager wrote:
> Rename kElementsKindFirstBit to kElementsKindShift? We use the pair of "mask"
> and "shift" in many places in the system.

Done.

http://codereview.chromium.org/6966041/diff/2002/src/objects.h#newcode4002
src/objects.h:4002: // No bits can be used between kElementsKindFirstBit and
kElementsKindLastBit
On 2011/05/30 11:14:24, Mads Ager wrote:
> Since the elements kind is using the remaining bits, can we get away with just
> having kElementsKindShift of 4 and then simplifying the constants defined
below?
> I don't see how to free up any of these bits in any case, so I'm not sure it
> adds much to have the explicit upper bound?

Done.

Powered by Google App Engine
This is Rietveld 408576698