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

Issue 7529046: Refactor UnionOfKeys into ElementsAccessor (Closed)

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

Description

Refactor UnionOfKeys into ElementsAccessor BUG=none TEST=none Committed: http://code.google.com/p/v8/source/detail?r=8870

Patch Set 1 #

Total comments: 10

Patch Set 2 : review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -112 lines) Patch
M src/elements.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/elements.cc View 1 4 chunks +111 lines, -0 lines 0 comments Download
M src/objects.h View 1 chunk +0 lines, -4 lines 0 comments Download
M src/objects.cc View 2 chunks +1 line, -108 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
danno
Please review. Guidance: UnionOfDoubleKeys from object.cc has been "templatized" and moved into the element handler ...
9 years, 4 months ago (2011-08-09 14:00:49 UTC) #1
Kevin Millikin (Chromium)
LGTM. http://codereview.chromium.org/7529046/diff/1/src/elements.cc File src/elements.cc (right): http://codereview.chromium.org/7529046/diff/1/src/elements.cc#newcode44 src/elements.cc:44: if (element->IsSmi() && key->IsSmi() && (element == key)) ...
9 years, 4 months ago (2011-08-09 14:46:55 UTC) #2
danno
9 years, 4 months ago (2011-08-09 16:38:40 UTC) #3
Addressed feedback and landing.

http://codereview.chromium.org/7529046/diff/1/src/elements.cc
File src/elements.cc (right):

http://codereview.chromium.org/7529046/diff/1/src/elements.cc#newcode44
src/elements.cc:44: if (element->IsSmi() && key->IsSmi() && (element == key))
return true;
On 2011/08/09 14:46:55, Kevin Millikin wrote:
> If you feel like it, you could write
> 
> if (element->IsSmi() && (element == key)) ...

Done.

http://codereview.chromium.org/7529046/diff/1/src/elements.cc#newcode107
src/elements.cc:107: // Compute how many elements are not in this.
On 2011/08/09 14:46:55, Kevin Millikin wrote:
> "not in other".

Done.

http://codereview.chromium.org/7529046/diff/1/src/elements.cc#newcode120
src/elements.cc:120: Object* obj;
On 2011/08/09 14:46:55, Kevin Millikin wrote:
> There's a template member function on MaybeObject that you can use here,
> avoiding writing out the cast and the extra variable 'obj':
> 
> FixedArray* result;
> MaybeObject* maybe_obj =
>     other->GetHeap()->AllocateFixedArray(len0 + extra);
> if (!maybe_obj->To<FixedArray>(&result)) return maybe_obj;

Done.

http://codereview.chromium.org/7529046/diff/1/src/elements.cc#newcode158
src/elements.cc:158: int index) {
On 2011/08/09 14:46:55, Kevin Millikin wrote:
> Indentation is off here.

Done.

http://codereview.chromium.org/7529046/diff/1/src/elements.cc#newcode422
src/elements.cc:422: int index) {
On 2011/08/09 14:46:55, Kevin Millikin wrote:
> Indentation is off here.

Done.

Powered by Google App Engine
This is Rietveld 408576698