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

Issue 6528: This change rewrites some of the code to add properties to an object.... (Closed)

Created:
12 years, 2 months ago by William Hesse
Modified:
9 years, 7 months ago
Reviewers:
bak
CC:
v8-dev
Visibility:
Public.

Description

This change rewrites some of the code to add properties to an object. It removes the ReplaceConstantFunction code, and replaces it with new ConvertDescriptorToField code, that is also used in other places. Functions CopyRemove and CopyReplace on DescriptorArray are removed. Function AddFastProperty is simplified by removing the CONSTANT_TRANSITION case. Committed: http://code.google.com/p/v8/source/detail?r=475

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -248 lines) Patch
M src/objects.h View 1 2 4 chunks +24 lines, -18 lines 0 comments Download
M src/objects.cc View 1 2 11 chunks +131 lines, -230 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
William Hesse
Here is the last of the changes to AddProperty and descriptor arrays.
12 years, 2 months ago (2008-10-07 10:41:36 UTC) #1
bak
LGTM, Lars http://codereview.chromium.org/6528/diff/1/2 File src/objects.cc (right): http://codereview.chromium.org/6528/diff/1/2#newcode1223 Line 1223: // Make new properties array if ...
12 years, 2 months ago (2008-10-08 10:38:25 UTC) #2
William Hesse
12 years, 2 months ago (2008-10-08 16:54:54 UTC) #3
All suggested changes made, except refactoring.  Instead, 
scope of an if has been reduced dramatically in 
AddFastProperty, eliminating duplicate code.  Tested & Linted.
New changes to AddFastProperty uploaded to this changelist.



On 2008/10/08 10:38:25, bak wrote:
> LGTM,
>   Lars
> 
> http://codereview.chromium.org/6528/diff/1/2
> File src/objects.cc (right):
> 
> http://codereview.chromium.org/6528/diff/1/2#newcode1223
> Line 1223: // Make new properties array if necessary.
> Please check if you could refactor the code below. It is used
> in other functions.
> 
> http://codereview.chromium.org/6528/diff/1/2#newcode1552
> Line 1552: } else {
> remove } else {   }.
> keep the return ConvertDescriptorToField(name, value, attributes);
> 
> http://codereview.chromium.org/6528/diff/1/2#newcode1603
> Line 1603: /*
> Please remove the dead code but leave a comment.
> There are two other places in this function.
> 
> http://codereview.chromium.org/6528/diff/1/2#newcode1661
> Line 1661: case NULL_DESCRIPTOR:
> Code not used yet. I was a bit confused since it is never used.
> 
> http://codereview.chromium.org/6528/diff/1/3
> File src/objects.h (right):
> 
> http://codereview.chromium.org/6528/diff/1/3#newcode1395
> Line 1395: // When adding to the properties FixedArray, we increase its size
by
> When extending the backing storage for property values, ...

Powered by Google App Engine
This is Rietveld 408576698