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

Issue 460109: Perform string add in generated code on X64 platform... (Closed)

Created:
11 years ago by Søren Thygesen Gjesse
Modified:
9 years, 7 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

Perform string add in generated code on X64 platform This is a port of the IA-32 version from r3400 (http://code.google.com/p/v8/source/detail?r=3400). In the X64 version the additional registers are used to avoid loading the instance type and arguments several times. Committed: http://code.google.com/p/v8/source/detail?r=3434

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 30

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+408 lines, -12 lines) Patch
M src/ia32/codegen-ia32.h View 1 chunk +5 lines, -5 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 2 chunks +2 lines, -1 line 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M src/x64/codegen-x64.h View 1 1 chunk +30 lines, -0 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 2 3 chunks +232 lines, -3 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 2 chunks +29 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 2 chunks +108 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Søren Thygesen Gjesse
11 years ago (2009-12-07 15:27:41 UTC) #1
Lasse Reichstein
LGTM, only minor comments. http://codereview.chromium.org/460109/diff/3001/3005 File src/x64/assembler-x64.h (right): http://codereview.chromium.org/460109/diff/3001/3005#newcode537 src/x64/assembler-x64.h:537: void movw(Register src, const Operand& ...
11 years ago (2009-12-08 14:16:09 UTC) #2
Søren Thygesen Gjesse
http://codereview.chromium.org/460109/diff/3001/3005 File src/x64/assembler-x64.h (right): http://codereview.chromium.org/460109/diff/3001/3005#newcode537 src/x64/assembler-x64.h:537: void movw(Register src, const Operand& dst); On 2009/12/08 14:16:11, ...
11 years ago (2009-12-09 09:35:10 UTC) #3
Lasse Reichstein
11 years ago (2009-12-09 10:00:32 UTC) #4
http://codereview.chromium.org/460109/diff/3001/3006
File src/x64/codegen-x64.cc (right):

http://codereview.chromium.org/460109/diff/3001/3006#newcode7953
src/x64/codegen-x64.cc:7953: ASSERT((String::kMaxLength & 0x80000000) == 0);
It's definitly true that kMaxLength isn't negative.
Whether it's the same as not having bit 31 set, that's a different question :)
We assume that int is 32-bit in many, many places already, and you read the
string length from a 32-bit field in other parts of this code, so string lengths
are necessarily restricted to 32 bits.
kMaxLength should probably be unsigned, but the "above" test takes care of that
anyway.

That strings lengths are actually less than 31 bits is more important to check
above, where you add two lengths and don't check for overflow (you don't need
to, but it isn't asserted there).

http://codereview.chromium.org/460109/diff/3001/3007
File src/x64/codegen-x64.h (right):

http://codereview.chromium.org/460109/diff/3001/3007#newcode763
src/x64/codegen-x64.h:763: int MinorKey() { return string_check_ ? 0 : 1; }
Yes, but if you just return string_check from a method returning int, it will be
converted. 
Here you actively swap the 0 and 1 values, and I was wondering if there was a
reason for that.

Powered by Google App Engine
This is Rietveld 408576698