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

Issue 660245: Faster moving FixedArray elements around. (Closed)

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

Description

Faster moving FixedArray elements around. Committed: http://code.google.com/p/v8/source/detail?r=3987

Patch Set 1 : Next round #

Total comments: 6

Patch Set 2 : Next round #

Unified diffs Side-by-side diffs Delta from patch set Stats (+796 lines, -127 lines) Patch
M src/array.js View 1 chunk +2 lines, -0 lines 0 comments Download
M src/builtins.cc View 1 12 chunks +150 lines, -126 lines 0 comments Download
M src/heap.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/heap-inl.h View 1 chunk +12 lines, -0 lines 0 comments Download
M src/objects.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 chunk +5 lines, -0 lines 0 comments Download
M src/runtime.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime.cc View 1 chunk +11 lines, -0 lines 0 comments Download
A test/mjsunit/array-elements-from-array-prototype.js View 1 chunk +191 lines, -0 lines 0 comments Download
A test/mjsunit/array-elements-from-array-prototype-chain.js View 1 chunk +191 lines, -0 lines 0 comments Download
A test/mjsunit/array-elements-from-object-prototype.js View 1 chunk +191 lines, -0 lines 0 comments Download
M test/mjsunit/array-splice.js View 1 chunk +10 lines, -0 lines 0 comments Download
M test/mjsunit/array-unshift.js View 1 chunk +8 lines, -0 lines 0 comments Download
M test/mjsunit/fuzz-natives.js View 1 chunk +4 lines, -1 line 0 comments Download
M test/mjsunit/undeletable-functions.js View 1 2 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
antonm
Mads, Søren, may you have a look? It's actually rework of http://codereview.chromium.org/650043/show and mostly differs ...
10 years, 9 months ago (2010-03-01 07:49:38 UTC) #1
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/660245/diff/15/17 File src/builtins.cc (right): http://codereview.chromium.org/660245/diff/15/17#newcode276 src/builtins.cc:276: Heap::RecordWrites(dst->address(), How about adding a static function to ...
10 years, 9 months ago (2010-03-01 10:07:38 UTC) #2
antonm
10 years, 9 months ago (2010-03-01 14:49:28 UTC) #3
Søren,

thanks a lot for review and sorry for late response.  I'm going to submit after
rerunning the test (which would take some time).

If you have any concerns (esp. for fuzz-natives.js), chances are I'll address
them before submitting.  Otherwise that would require another CL.

http://codereview.chromium.org/660245/diff/15/17
File src/builtins.cc (right):

http://codereview.chromium.org/660245/diff/15/17#newcode276
src/builtins.cc:276: Heap::RecordWrites(dst->address(),
On 2010/03/01 10:07:38, Søren Gjesse wrote:
> How about adding a static function to FixedArray calculating
> 
>   FixedArray::kHeaderSize + dst_index * kPointerSize
> 
> as it is used a couple of times here (like the data_start() you already
added).
> It is actually what FixedArray::SizeFor() does, but I there should be one with
a
> different name.

Sure.  And I am lucky today: there is already FixedArray::OffsetOfElementAt :)

http://codereview.chromium.org/660245/diff/15/19
File src/heap.h (right):

http://codereview.chromium.org/660245/diff/15/19#newcode773
src/heap.h:773: // Write barrier support for address[start : start + len] = o.
On 2010/03/01 10:07:38, Søren Gjesse wrote:
> Is start + len included? ([start : start + len] -> [start : start + len[)

I used pythonic notation, but switched to [start : start + len[.

http://codereview.chromium.org/660245/diff/15/29
File test/mjsunit/fuzz-natives.js (right):

http://codereview.chromium.org/660245/diff/15/29#newcode152
test/mjsunit/fuzz-natives.js:152: // That can only be invoked on
Array.prototype.
On 2010/03/01 10:07:38, Søren Gjesse wrote:
> That -> This
> 
> Why can't this survive fuzzing?

If I understand the idea of the test correctly, it attempts to call various
native functions passing in different types of parameters. 
FinishArrayPrototypeSetup expects to get only Array.prototype.  I could easily
extend it to be more acceptable if it's preferred approach.

Powered by Google App Engine
This is Rietveld 408576698