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

Issue 11413179: Avoid double initialization of arrays. (Closed)

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

Description

Avoid double initialization of arrays. Committed: https://code.google.com/p/v8/source/detail?r=13064

Patch Set 1 #

Total comments: 12

Patch Set 2 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -62 lines) Patch
M src/builtins.cc View 1 4 chunks +25 lines, -36 lines 0 comments Download
M src/elements.cc View 1 3 chunks +20 lines, -18 lines 0 comments Download
M src/objects.cc View 2 chunks +6 lines, -7 lines 0 comments Download
M test/mjsunit/regress/regress-121407.js View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Toon Verwaest
PTAL
8 years ago (2012-11-27 09:06:56 UTC) #1
Michael Starzinger
LGTM with one real comment and a few nits. https://codereview.chromium.org/11413179/diff/1/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/11413179/diff/1/src/builtins.cc#newcode579 src/builtins.cc:579: ...
8 years ago (2012-11-27 11:53:56 UTC) #2
Toon Verwaest
8 years ago (2012-11-27 11:59:30 UTC) #3
Addressed comments.

https://chromiumcodereview.appspot.com/11413179/diff/1/src/builtins.cc
File src/builtins.cc (right):

https://chromiumcodereview.appspot.com/11413179/diff/1/src/builtins.cc#newcod...
src/builtins.cc:579: accessor->CopyElements(
On 2012/11/27 11:53:56, Michael Starzinger wrote:
> Move the accessor->CopyElements into the first line, this will get rid of one
> indentation level.

Done.

https://chromiumcodereview.appspot.com/11413179/diff/1/src/builtins.cc#newcod...
src/builtins.cc:627: accessor->CopyElements(
On 2012/11/27 11:53:56, Michael Starzinger wrote:
> Likewise.

Done.

https://chromiumcodereview.appspot.com/11413179/diff/1/src/builtins.cc#newcod...
src/builtins.cc:790: accessor->CopyElements(
On 2012/11/27 11:53:56, Michael Starzinger wrote:
> Likewise.

Done.

https://chromiumcodereview.appspot.com/11413179/diff/1/src/elements.cc
File src/elements.cc (right):

https://chromiumcodereview.appspot.com/11413179/diff/1/src/elements.cc#newcod...
src/elements.cc:156: ASSERT(to->map() != HEAP->fixed_cow_array_map());
On 2012/11/27 11:53:56, Michael Starzinger wrote:
> We are assuming that this function does not allocate, so we should add a
> no-allocation scope to the top of the function.
> 
> AssertNoAllocation no_allocation;

Done.

https://chromiumcodereview.appspot.com/11413179/diff/1/src/elements.cc#newcod...
src/elements.cc:201: int copy_size = raw_copy_size;
On 2012/11/27 11:53:56, Michael Starzinger wrote:
> Likewise.

Done.

https://chromiumcodereview.appspot.com/11413179/diff/1/test/mjsunit/regress/r...
File test/mjsunit/regress/regress-121407.js (right):

https://chromiumcodereview.appspot.com/11413179/diff/1/test/mjsunit/regress/r...
test/mjsunit/regress/regress-121407.js:40: }
Adds.

On 2012/11/27 11:53:56, Michael Starzinger wrote:
> I hope this adds a trailing newline instead of removing one? I cannot tell
from
> the diff.

Powered by Google App Engine
This is Rietveld 408576698