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

Issue 7473031: Remaining changes to fully support FastDoubleArray. (Closed)

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

Description

Remaining changes to fully support FastDoubleArray. R=ager@chromium.org BUG=none TEST=cctests, unboxed-double-array.js Committed: http://code.google.com/p/v8/source/detail?r=8718

Patch Set 1 #

Patch Set 2 : keep unboxed double array disabled by default #

Patch Set 3 : name tweaks #

Patch Set 4 : final tweaks #

Total comments: 7

Patch Set 5 : review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -15 lines) Patch
M src/objects.h View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 4 8 chunks +88 lines, -9 lines 0 comments Download
M src/objects-printer.cc View 3 chunks +14 lines, -4 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 1 chunk +62 lines, -0 lines 0 comments Download
M test/mjsunit/unbox-double-arrays.js View 1 2 3 4 2 chunks +13 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
danno
Please review.
9 years, 5 months ago (2011-07-22 06:57:43 UTC) #1
Mads Ager (chromium)
LGTM We should deal with the double keys differently, but feel free to do that ...
9 years, 5 months ago (2011-07-22 08:29:19 UTC) #2
danno
9 years, 5 months ago (2011-07-22 09:10:12 UTC) #3
Feedback addressed, landing.

http://codereview.chromium.org/7473031/diff/3006/src/objects.cc
File src/objects.cc (right):

http://codereview.chromium.org/7473031/diff/3006/src/objects.cc#newcode4810
src/objects.cc:4810: MaybeObject* maybe_obj =
heap->NumberFromDouble(other->get(y));
Submitted as 1567.
On 2011/07/22 08:29:20, Mads Ager wrote:
> This is nasty. This can lead to out-of-memory crashes when we are in fact not
> out of memory if the double array is large enough. That is probably very
> unlikely to happen, but still. I wonder if we can restrict the API so that we
> can never get doubles in key arrays (require integers and strings only)?
> Alternatively, we should be able to create the key integer/string directly
from
> the double without going through a heap number allocation.
> 
> Feel free to deal with this in a separate changelist.

http://codereview.chromium.org/7473031/diff/3006/src/objects.cc#newcode4823
src/objects.cc:4823: AssertNoAllocation no_gc;
On 2011/07/22 08:29:20, Mads Ager wrote:
> Maybe we should change the name to AssertNoGC at some point. There will be
lots
> of allocation below. Maybe limit the scope of the AssertNoAllocation? This is
to
> make sure that the write barrier mode stays valid, right?

Done.

http://codereview.chromium.org/7473031/diff/3006/src/objects.cc#newcode4835
src/objects.cc:4835: MaybeObject* maybe_obj =
heap->NumberFromDouble(other->get(y));
On 2011/07/22 08:29:20, Mads Ager wrote:
> Here again. So we actually allocate two new heap numbers per entry. We should
> create the integer/string key directly from the double.
See above.

Powered by Google App Engine
This is Rietveld 408576698