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

Issue 164135: X64: Implement fast charCodeAt. (Closed)

Created:
11 years, 4 months ago by Lasse Reichstein
Modified:
9 years, 6 months ago
Reviewers:
William Hesse
CC:
v8-dev
Visibility:
Public.

Description

X64: Implement fast charCodeAt.

Patch Set 1 #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+177 lines, -6 lines) Patch
M src/x64/assembler-x64.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/x64/assembler-x64.cc View 1 chunk +20 lines, -0 lines 0 comments Download
M src/x64/codegen-x64.cc View 2 chunks +155 lines, -6 lines 9 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein
Review of direct translation from ia32.
11 years, 4 months ago (2009-08-07 07:52:08 UTC) #1
William Hesse
LGTM, with comments. http://codereview.chromium.org/164135/diff/1/4 File src/x64/codegen-x64.cc (right): http://codereview.chromium.org/164135/diff/1/4#newcode3492 Line 3492: Immediate(static_cast<uint32_t>(kSmiTagMask | 0x80000000U))); shouldn't this ...
11 years, 4 months ago (2009-08-07 10:27:15 UTC) #2
Lasse Reichstein
11 years, 4 months ago (2009-08-07 10:44:27 UTC) #3
http://codereview.chromium.org/164135/diff/1/4
File src/x64/codegen-x64.cc (right):

http://codereview.chromium.org/164135/diff/1/4#newcode3492
Line 3492: Immediate(static_cast<uint32_t>(kSmiTagMask | 0x80000000U)));
Done.

http://codereview.chromium.org/164135/diff/1/4#newcode3516
Line 3516: __ shrl(temp.reg());  // The shift amount in ecx is implicit operand.
Not sure whether high bit can be 1 (would be waste of a bit if it can't), but if
it can, this should be shr. It's a String's length, shifted left, so it should
be positive.

http://codereview.chromium.org/164135/diff/1/4#newcode3519
Line 3519: __ j(greater_equal, &slow_case);
The string length is definitly positive, the index was tested to be non-negative
above (before un-smi-tagging). I.e., it doesn't matter.
I'll change it to above_equal to suggest the we are dealing with positive
numbers only.

http://codereview.chromium.org/164135/diff/1/4#newcode3534
Line 3534: __ movzxwl(temp.reg(), FieldOperand(object.reg(),
Already there. It's just a another operand size for movzxb and movzxw.

http://codereview.chromium.org/164135/diff/1/4#newcode3534
Line 3534: __ movzxwl(temp.reg(), FieldOperand(object.reg(),
Already there. It's just a another operand size for movzxb and movzxw.

Powered by Google App Engine
This is Rietveld 408576698