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

Issue 11413142: Fix array concat for holey arrays and concat of double to object arrays. (Closed)

Created:
8 years, 1 month ago by Toon Verwaest
Modified:
8 years, 1 month ago
Reviewers:
mvstanton
CC:
v8-dev
Visibility:
Public.

Description

- Initialize the result array with holes if we concat a double array into an object array, since it may cause a marking step while boxing a double. - Ensure we go holey if we are concatting any holey array. Committed: https://code.google.com/p/v8/source/detail?r=13038

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -15 lines) Patch
M src/builtins.cc View 1 10 chunks +28 lines, -12 lines 0 comments Download
M src/factory.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M src/heap.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M src/objects.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Toon Verwaest
PTAL
8 years, 1 month ago (2012-11-22 15:18:56 UTC) #1
mvstanton
One nit and one suggestion. LGTM. https://chromiumcodereview.appspot.com/11413142/diff/1/src/builtins.cc File src/builtins.cc (right): https://chromiumcodereview.appspot.com/11413142/diff/1/src/builtins.cc#newcode1045 src/builtins.cc:1045: AssertNoAllocation no_gc; Here ...
8 years, 1 month ago (2012-11-22 15:55:41 UTC) #2
Toon Verwaest
8 years, 1 month ago (2012-11-22 16:23:13 UTC) #3
Addressed comment

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

https://chromiumcodereview.appspot.com/11413142/diff/1/src/builtins.cc#newcod...
src/builtins.cc:1045: AssertNoAllocation no_gc;
On 2012/11/22 15:55:41, mvstanton wrote:
> Here you have a scoping brace, for the AssertNoAllocation? Style-wise, I
> wouldn't do it because it's not done at other sites.

Done.

https://chromiumcodereview.appspot.com/11413142/diff/1/src/builtins.cc#newcod...
src/builtins.cc:1210: has_double = has_double ||
IsFastDoubleElementsKind(arg_kind);
Seems like what I have is faster. You can replace it with your
GetUnifiedFastElement once it's in and fast.

On 2012/11/22 15:55:41, mvstanton wrote:
> This works, but you might like something that I have in my current project:
> 
> ElementsKind GetUnifiedFastElementsKind(k1,k2);
> 
> It does the right thing for our elements transition tree.
> For example DOUBLE and HOLEY_SMI unifies to HOLEY_DOUBLE.
> 
> You'd still need to keep the has_double boolean for the predicate below.

Powered by Google App Engine
This is Rietveld 408576698