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

Issue 2111011: Change keyed store IC interface on x64 to take value, key, and receiver in re... (Closed)

Created:
10 years, 7 months ago by William Hesse
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Change keyed store IC interface on x64 to take value, key, and receiver in registers rather than on the stack. Committed: http://code.google.com/p/v8/source/detail?r=4692

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 17

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+322 lines, -215 lines) Patch
M src/ia32/virtual-frame-ia32.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/x64/codegen-x64.cc View 1 2 4 chunks +47 lines, -12 lines 0 comments Download
M src/x64/debug-x64.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 2 4 chunks +17 lines, -12 lines 0 comments Download
M src/x64/ic-x64.cc View 1 2 8 chunks +121 lines, -121 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 1 2 1 chunk +2 lines, -7 lines 0 comments Download
M src/x64/virtual-frame-x64.h View 1 2 2 chunks +33 lines, -5 lines 0 comments Download
M src/x64/virtual-frame-x64.cc View 1 2 3 chunks +86 lines, -54 lines 0 comments Download
M test/mjsunit/compiler/assignment.js View 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
William Hesse
10 years, 7 months ago (2010-05-20 08:50:59 UTC) #1
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/2111011/diff/10001/11002 File src/x64/codegen-x64.cc (right): http://codereview.chromium.org/2111011/diff/10001/11002#newcode694 src/x64/codegen-x64.cc:694: } else if (receiver_.is(value_)) { I don't get ...
10 years, 7 months ago (2010-05-20 11:54:32 UTC) #2
William Hesse
10 years, 7 months ago (2010-05-20 14:56:09 UTC) #3
http://codereview.chromium.org/2111011/diff/10001/11002
File src/x64/codegen-x64.cc (right):

http://codereview.chromium.org/2111011/diff/10001/11002#newcode694
src/x64/codegen-x64.cc:694: } else if (receiver_.is(value_)) {
On 2010/05/20 11:54:32, Søren Gjesse wrote:
> I don't get this, can receiver_.is(value_) ever be true?

Yes.  var x=new Object(); x[i] = x;

http://codereview.chromium.org/2111011/diff/10001/11002#newcode704
src/x64/codegen-x64.cc:704: // Value is now in rax. Its original location is
remembered in value_.
On 2010/05/20 11:54:32, Søren Gjesse wrote:
> Maybe extend comment to say that value_ is used later to store the result, and
> that receiver_ and key_ might not have their original values.
> 
> Alternatively use two locals receiver and key to avoid overwriting receiver_
and
> key_ when swapping with rax.

Done.

http://codereview.chromium.org/2111011/diff/10001/11002#newcode718
src/x64/codegen-x64.cc:718: }
If key_ is rdx and receiver_ is rbx, we need to move key_ first.

On 2010/05/20 11:54:32, Søren Gjesse wrote:
> How about
> 
>   } else 
>     // receiver_ is neither rcx nor rdx.
>     __ movq(rdx, receiver_);
>     if (!key_.is(rcx)) {
>     __ movq(rcx, key_);
>     }
>   }
> 
> instead of
> 
>   } else if (key_.is(rcx)) {
>     __ movq(rdx, receiver_);
>   } else {
>     __ movq(rcx, key_);
>     __ movq(rdx, receiver_);
>   }

http://codereview.chromium.org/2111011/diff/10001/11005
File src/x64/ic-x64.cc (right):

http://codereview.chromium.org/2111011/diff/10001/11005#newcode900
src/x64/ic-x64.cc:900: // rdx: JSArray
On 2010/05/20 11:54:32, Søren Gjesse wrote:
> JSArray -> receiver (a JSArray)
> 
> Like in the comment below.

Done.

http://codereview.chromium.org/2111011/diff/10001/11005#newcode1065
src/x64/ic-x64.cc:1065: __ pop(rdx);
On 2010/05/20 11:54:32, Søren Gjesse wrote:
> Please add the comment on rbx and rdi content here as well.

Done.

http://codereview.chromium.org/2111011/diff/10001/11005#newcode1102
src/x64/ic-x64.cc:1102: __ bind(&is_nan);
On 2010/05/20 11:54:32, Søren Gjesse wrote:
> Please add comment on register content as above.

Done.

http://codereview.chromium.org/2111011/diff/10001/11007
File src/x64/virtual-frame-x64.cc (right):

http://codereview.chromium.org/2111011/diff/10001/11007#newcode1035
src/x64/virtual-frame-x64.cc:1035: // are a and b.  Other results can be live,
but must not be in a_reg or b_reg.
On 2010/05/20 11:54:32, Søren Gjesse wrote:
> Please assert these asumptions.

Done.

http://codereview.chromium.org/2111011/diff/10001/11007#newcode1046
src/x64/virtual-frame-x64.cc:1046: // a must be in b_reg, b in a_reg.
This is only used in setting up arguments in registers for
an ic call, which relies on a spilled frame and does not preserve registers on
return, so we don't need this.
We could also just swap using a temporary variable.

It On 2010/05/20 11:54:32, Søren Gjesse wrote:
> How about adding swapping of results to the virtual frame? Then you don´t need
> to rely on a and b being invalidated and the caller can decide when to
> invalidate.

Powered by Google App Engine
This is Rietveld 408576698