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

Issue 10743003: Splitting DescriptorArray::CopyInsert into CopyInsert and CopyReplace. (Closed)

Created:
8 years, 5 months ago by Toon Verwaest
Modified:
8 years, 5 months ago
Reviewers:
Michael Starzinger
CC:
v8-dev
Visibility:
Public.

Description

Splitting DescriptorArray::CopyInsert into CopyInsert, CopyAdd and CopyReplace. Committed: https://code.google.com/p/v8/source/detail?r=12060

Patch Set 1 : u #

Total comments: 6

Patch Set 2 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -50 lines) Patch
M src/factory.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M src/objects.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/objects.cc View 1 5 chunks +66 lines, -46 lines 0 comments Download
M src/runtime.cc View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
Toon Verwaest
Small refactoring. PTAL.
8 years, 5 months ago (2012-07-09 16:15:39 UTC) #1
Michael Starzinger
8 years, 5 months ago (2012-07-12 13:17:42 UTC) #2
LGTM (with a few nits).

https://chromiumcodereview.appspot.com/10743003/diff/7005/src/objects.cc
File src/objects.cc (right):

https://chromiumcodereview.appspot.com/10743003/diff/7005/src/objects.cc#newc...
src/objects.cc:5881:
descriptor->SetEnumerationIndex(GetDetails(insertion_index).index());
Can we move this after the WhitenessWitness. It doesn't matter functionally, but
it keeps the code in sync with CopyAdd() a few lines below.

https://chromiumcodereview.appspot.com/10743003/diff/7005/src/objects.cc#newc...
src/objects.cc:5885: // Copy the descriptors, inserting or replacing a
descriptor.
Drop "inserting or" from the comment.

https://chromiumcodereview.appspot.com/10743003/diff/7005/src/objects.cc#newc...
src/objects.cc:5895: 
Maybe we should add "SLOW_ASSERT(new_descriptors->IsSortedNoDuplicates())" here
as well.

https://chromiumcodereview.appspot.com/10743003/diff/7005/src/objects.cc#newc...
src/objects.cc:5933: // Copy the descriptors, inserting or replacing a
descriptor.
Drop "or replacing" from, the comment.

https://chromiumcodereview.appspot.com/10743003/diff/7005/src/objects.cc#newc...
src/objects.cc:5944: 
Remove this empty newline.

https://chromiumcodereview.appspot.com/10743003/diff/7005/src/objects.h
File src/objects.h (right):

https://chromiumcodereview.appspot.com/10743003/diff/7005/src/objects.h#newco...
src/objects.h:2574: int insertion_index, Descriptor* descriptor);
To me it seems more intuitive to switch those two arguments, first the
descriptor, then the insertion_index. But I'll leave the final decision up to
you.

Also can we have the linebreak after the "," to be consistent with the other
declarations.

Powered by Google App Engine
This is Rietveld 408576698