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

Issue 7170012: Crankshaft support for polymorphic array handling (Closed)

Created:
9 years, 6 months ago by Jakob Kummerow
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Crankshaft support for polymorphic array handling Committed: http://code.google.com/p/v8/source/detail?r=8325

Patch Set 1 #

Total comments: 14

Patch Set 2 : address Florian's comments #

Total comments: 22

Patch Set 3 : address next round of comments. #

Total comments: 8

Patch Set 4 : address comments; add implemention for ARM and x64 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+768 lines, -218 lines) Patch
M src/arm/lithium-arm.h View 1 2 3 4 chunks +37 lines, -0 lines 0 comments Download
M src/arm/lithium-arm.cc View 1 2 3 3 chunks +16 lines, -0 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 3 4 chunks +48 lines, -6 lines 0 comments Download
M src/ast.h View 3 chunks +4 lines, -1 line 0 comments Download
M src/ast.cc View 1 2 3 3 chunks +11 lines, -2 lines 0 comments Download
M src/hydrogen.h View 1 2 2 chunks +29 lines, -26 lines 0 comments Download
M src/hydrogen.cc View 1 2 3 9 chunks +289 lines, -164 lines 3 comments Download
M src/hydrogen-instructions.h View 1 2 3 6 chunks +67 lines, -1 line 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 3 4 chunks +51 lines, -5 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 3 4 chunks +38 lines, -1 line 0 comments Download
M src/ia32/lithium-ia32.cc View 1 2 3 3 chunks +16 lines, -0 lines 0 comments Download
M src/ic.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M src/ic.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/objects.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/objects.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M src/objects-inl.h View 1 chunk +2 lines, -0 lines 2 comments Download
M src/type-info.h View 1 2 3 3 chunks +6 lines, -0 lines 0 comments Download
M src/type-info.cc View 1 4 chunks +48 lines, -0 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 3 4 chunks +50 lines, -5 lines 0 comments Download
M src/x64/lithium-x64.h View 1 2 3 4 chunks +37 lines, -0 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 2 3 3 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Jakob Kummerow
Please take a look. ARM and x64 aren't implemented yet (so this only compiles for ...
9 years, 6 months ago (2011-06-15 09:35:46 UTC) #1
fschneider
drive-by comments: http://codereview.chromium.org/7170012/diff/1/src/hydrogen-instructions.h File src/hydrogen-instructions.h (left): http://codereview.chromium.org/7170012/diff/1/src/hydrogen-instructions.h#oldcode405 src/hydrogen-instructions.h:405: kJSArray = 0x701, // 0000 0111 1000 ...
9 years, 6 months ago (2011-06-15 12:11:46 UTC) #2
Jakob Kummerow
Thanks for the comments! http://codereview.chromium.org/7170012/diff/1/src/hydrogen-instructions.h File src/hydrogen-instructions.h (left): http://codereview.chromium.org/7170012/diff/1/src/hydrogen-instructions.h#oldcode405 src/hydrogen-instructions.h:405: kJSArray = 0x701, // 0000 ...
9 years, 6 months ago (2011-06-15 12:28:58 UTC) #3
fschneider
This looks already pretty good. Here are mostly comments to simplify the code a little. ...
9 years, 6 months ago (2011-06-16 13:21:28 UTC) #4
Jakob Kummerow
http://codereview.chromium.org/7170012/diff/3001/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/7170012/diff/3001/src/hydrogen.cc#newcode3781 src/hydrogen.cc:3781: if (is_store) { On 2011/06/16 13:21:28, fschneider wrote: > ...
9 years, 6 months ago (2011-06-17 08:06:09 UTC) #5
fschneider
LGTM. http://codereview.chromium.org/7170012/diff/6001/src/ast.cc File src/ast.cc (right): http://codereview.chromium.org/7170012/diff/6001/src/ast.cc#newcode611 src/ast.cc:611: // TODO(jkummerow): use constant instead of "4". You ...
9 years, 6 months ago (2011-06-17 08:59:34 UTC) #6
Jakob Kummerow
Here's the implementation for ARM and x64. Permission to land, sir? http://codereview.chromium.org/7170012/diff/6001/src/ast.cc File src/ast.cc (right): ...
9 years, 6 months ago (2011-06-17 17:43:14 UTC) #7
fschneider
ARM and x64 parts LGTM as well.
9 years, 6 months ago (2011-06-20 09:25:00 UTC) #8
Søren Thygesen Gjesse
Drive by comments. http://codereview.chromium.org/7170012/diff/10011/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/7170012/diff/10011/src/hydrogen.cc#newcode3913 src/hydrogen.cc:3913: if (elements_kind == 1 && todo_external_array) ...
9 years, 6 months ago (2011-06-21 07:09:03 UTC) #9
Jakob Kummerow
http://codereview.chromium.org/7170012/diff/10011/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/7170012/diff/10011/src/hydrogen.cc#newcode3913 src/hydrogen.cc:3913: if (elements_kind == 1 && todo_external_array) { On 2011/06/21 ...
9 years, 6 months ago (2011-06-21 07:49:23 UTC) #10
Søren Thygesen Gjesse
9 years, 6 months ago (2011-06-21 10:01:53 UTC) #11
http://codereview.chromium.org/7170012/diff/10011/src/hydrogen.cc
File src/hydrogen.cc (right):

http://codereview.chromium.org/7170012/diff/10011/src/hydrogen.cc#newcode3913
src/hydrogen.cc:3913: if (elements_kind == 1 && todo_external_array) {
On 2011/06/21 07:49:23, jkummerow wrote:
> On 2011/06/21 07:09:04, Søren Gjesse wrote:
> > Shouldn't the constant 1 here be JSObject::FAST_ELEMENTS?
> 
> No. FAST_ELEMENTS == 0. As the comment indicates, this if-block must be
executed
> after the first (== at the beginning of the second) run of the loop. I haven't
> used a named constant instead of "1" because it doesn't matter what elements
> kind 1 corresponds to, as long as it's the first one that comes after
> FAST_ELEMENTS.
> 
> I could move this block to the end of the loop's code (after the end of the
"if
> (type_todo[elements_kind]) {...}" block), and accordingly change the
condition,
> but I personally don't think that would enhance readability.

I see.

I think it should stay at the beginning of the loop, but you could consider
adding

    SECOND_ELEMENTS_KIND = FAST_DOUBLE_ELEMENTS,

to objects.h

and use SECOND_ELEMENTS_KIND that instead of 1, but then you should probably
also add

STATIC_ASSERT(JSObject::SECOND_ELEMENTS_KIND == 1);

Not sure whether that is better.

Powered by Google App Engine
This is Rietveld 408576698