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

Issue 525115: Add generated code for ascii string comparison... (Closed)

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

Description

Add generated code for ascii string comparison Careted a stub for string comparison and used part of the code from that to inline string comparison in the compare stub. Committed: http://code.google.com/p/v8/source/detail?r=3569

Patch Set 1 #

Total comments: 12

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+281 lines, -5 lines) Patch
M src/arm/codegen-arm.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/arm/codegen-arm.cc View 1 1 chunk +11 lines, -0 lines 0 comments Download
M src/code-stubs.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/codegen.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/ia32/assembler-ia32.h View 1 3 chunks +5 lines, -1 line 0 comments Download
M src/ia32/assembler-ia32.cc View 1 2 chunks +20 lines, -0 lines 0 comments Download
M src/ia32/codegen-ia32.h View 1 2 chunks +28 lines, -0 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 4 chunks +191 lines, -2 lines 0 comments Download
M src/runtime.cc View 1 2 chunks +3 lines, -0 lines 0 comments Download
M src/runtime.js View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/v8-counters.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/x64/codegen-x64.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
10 years, 11 months ago (2010-01-08 11:19:54 UTC) #1
Mads Ager (chromium)
LGTM http://codereview.chromium.org/525115/diff/1/5 File src/ia32/assembler-ia32.h (right): http://codereview.chromium.org/525115/diff/1/5#newcode679 src/ia32/assembler-ia32.h:679: // loop Expand comment? http://codereview.chromium.org/525115/diff/1/2 File src/ia32/codegen-ia32.cc (right): ...
10 years, 11 months ago (2010-01-08 11:33:05 UTC) #2
Søren Thygesen Gjesse
10 years, 11 months ago (2010-01-08 11:53:11 UTC) #3
Added smi check to the stub when called using %_StringCompare.

http://codereview.chromium.org/525115/diff/1/5
File src/ia32/assembler-ia32.h (right):

http://codereview.chromium.org/525115/diff/1/5#newcode679
src/ia32/assembler-ia32.h:679: // loop
On 2010/01/08 11:33:05, Mads Ager wrote:
> Expand comment?

Done.

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

http://codereview.chromium.org/525115/diff/1/2#newcode8450
src/ia32/codegen-ia32.cc:8450: __ and_(ecx, kFlatAsciiString);
On 2010/01/08 11:33:05, Mads Ager wrote:
> Can't you combine the checks.  And the two types, and with the mask, cmp and
> branch?

Not really. As both kStringTag and KSeqStringTag are all 0 bits and
kAsciiStringTag is 1 bit neither and nor or can be used.

Added kStringTag to the compare for completeness.

http://codereview.chromium.org/525115/diff/1/2#newcode9541
src/ia32/codegen-ia32.cc:9541: __ and_(ecx, kStringRepresentationMask |
kStringEncodingMask);
On 2010/01/08 11:33:05, Mads Ager wrote:
> Ditto.

Added missing kIsNotStringMask to mask, otherwise see above.

http://codereview.chromium.org/525115/diff/1/3
File src/ia32/codegen-ia32.h (right):

http://codereview.chromium.org/525115/diff/1/3#newcode817
src/ia32/codegen-ia32.h:817: // constraints on the registers that cna be passed.
On 2010/01/08 11:33:05, Mads Ager wrote:
> cna -> can

Done.

http://codereview.chromium.org/525115/diff/1/11
File src/v8-counters.h (right):

http://codereview.chromium.org/525115/diff/1/11#newcode157
src/v8-counters.h:157: SC(string_yyy, V8.StringYYY)                       \
On 2010/01/08 11:33:05, Mads Ager wrote:
> Remove these?

Done.

http://codereview.chromium.org/525115/diff/1/11#newcode161
src/v8-counters.h:161: SC(string_compare_native, V8.StringCompareNative)        
                \
On 2010/01/08 11:33:05, Mads Ager wrote:
> Align the '\' on these lines.

Done.

Powered by Google App Engine
This is Rietveld 408576698