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

Issue 2673001: Improve generated code for string encoding tests on ia32. (Closed)

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

Description

Improve generated code for string encoding tests on ia32. Committed: http://code.google.com/p/v8/source/detail?r=4812

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -69 lines) Patch
M src/ia32/codegen-ia32.cc View 1 7 chunks +65 lines, -69 lines 8 comments Download

Messages

Total messages: 3 (0 generated)
William Hesse
10 years, 6 months ago (2010-06-07 08:41:53 UTC) #1
Lasse Reichstein
LGTM http://codereview.chromium.org/2673001/diff/3001/4001 File src/ia32/codegen-ia32.cc (right): http://codereview.chromium.org/2673001/diff/3001/4001#newcode11310 src/ia32/codegen-ia32.cc:11310: // First check for flat two byte string. ...
10 years, 6 months ago (2010-06-07 09:29:06 UTC) #2
William Hesse
10 years, 6 months ago (2010-06-07 12:17:27 UTC) #3
http://codereview.chromium.org/2673001/diff/3001/4001
File src/ia32/codegen-ia32.cc (right):

http://codereview.chromium.org/2673001/diff/3001/4001#newcode11310
src/ia32/codegen-ia32.cc:11310: // First check for flat two byte string.
On 2010/06/07 09:29:06, Lasse Reichstein wrote:
> "two-byte"?

Done.

http://codereview.chromium.org/2673001/diff/3001/4001#newcode11311
src/ia32/codegen-ia32.cc:11311: __ and_(ebx,
All of these changed to test_b.

On 2010/06/07 09:29:06, Lasse Reichstein wrote:
> Would andb be enough? (Although I don't think it makes a difference at all
when
> the register isn't rax, I still like to see the size of the value I'm working
> on.)

http://codereview.chromium.org/2673001/diff/3001/4001#newcode11332
src/ia32/codegen-ia32.cc:11332: __ cmp(Operand(edx), Factory::empty_string());
On 2010/06/07 09:29:06, Lasse Reichstein wrote:
> Can you do a direct compare to memory? I.e.,
>  cmp(FieldOperand(eax, ConstString::kSecondOffset),
>      Factory::empty_string());
> 

Done.

http://codereview.chromium.org/2673001/diff/3001/4001#newcode12890
src/ia32/codegen-ia32.cc:12890: __ test(edi, Immediate(kStringEncodingMask));
We can do a test with the other one and the mask, combined, to check that they
are both ascii.

Done.

Powered by Google App Engine
This is Rietveld 408576698