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

Issue 507040: -Inlined double variant of compare iff one of the sides is a constant smi and... (Closed)

Created:
11 years ago by bak
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

-Inlined double variant of compare iff one of the sides is a constant smi and it is not a for loop condition. Committed: http://code.google.com/p/v8/source/detail?r=3487

Patch Set 1 #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -17 lines) Patch
M src/ast.h View 3 chunks +10 lines, -1 line 0 comments Download
M src/compiler.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M src/ia32/assembler-ia32.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/ia32/assembler-ia32.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M src/ia32/codegen-ia32.h View 2 chunks +4 lines, -3 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 9 chunks +52 lines, -8 lines 8 comments Download
M src/ia32/disasm-ia32.cc View 1 chunk +8 lines, -2 lines 2 comments Download
M src/parser.cc View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
bak
11 years ago (2009-12-17 18:38:16 UTC) #1
iposva
LGTM, but it would be good to get Kevin's input about all the jump target ...
11 years ago (2009-12-17 21:03:49 UTC) #2
bakster
11 years ago (2009-12-18 06:38:47 UTC) #3
//Lars

http://codereview.chromium.org/507040/diff/1/2
File src/ia32/codegen-ia32.cc (right):

http://codereview.chromium.org/507040/diff/1/2#newcode1869
src/ia32/codegen-ia32.cc:1869: bool is_for_loop_compare =
node->AsCompareOperation()
On 2009/12/17 21:03:50, iposva wrote:
> Shouldn't you do a " != NULL" here?

Done.

http://codereview.chromium.org/507040/diff/1/2#newcode1874
src/ia32/codegen-ia32.cc:1874: // The right side value is either a smi or heap
number.
On 2009/12/17 21:03:50, iposva wrote:
> Comment does not match the check. Right side is a smi.

Done.

http://codereview.chromium.org/507040/diff/1/2#newcode1888
src/ia32/codegen-ia32.cc:1888: __ cvtsi2sd(xmm0, Operand(temp.reg()));
I'm not sure it makes a difference. I'll try the optimization after the commit.

On 2009/12/17 21:03:50, iposva wrote:
> Why do you keep converting the value to double from int on every check? You
> could just create the double immediate and load it directly.

http://codereview.chromium.org/507040/diff/1/2#newcode6849
src/ia32/codegen-ia32.cc:6849: // The calling convention with registers is left
in edx and right in eax.
On 2009/12/17 21:03:50, iposva wrote:
> Unmotivated space?

Done.

http://codereview.chromium.org/507040/diff/1/6
File src/ia32/disasm-ia32.cc (right):

http://codereview.chromium.org/507040/diff/1/6#newcode1052
src/ia32/disasm-ia32.cc:1052: } if(*data == 0x57) {
On 2009/12/17 21:03:50, iposva wrote:
> missing else?

Done.

Powered by Google App Engine
This is Rietveld 408576698