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

Issue 2834028: X64: Make the ToBoolean inline code do even less if the value is known to be a smi. (Closed)

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

Description

X64: Make the ToBoolean inline code do even less if the value is known to be a smi.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -13 lines) Patch
M src/regexp.js View 2 chunks +6 lines, -6 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 chunk +12 lines, -7 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
Lasse Reichstein
10 years, 5 months ago (2010-06-28 16:50:41 UTC) #1
William Hesse
Is the corresponding change already made on other platforms? http://codereview.chromium.org/2834028/diff/1/3 File src/x64/codegen-x64.cc (right): http://codereview.chromium.org/2834028/diff/1/3#newcode5349 src/x64/codegen-x64.cc:5349: ...
10 years, 5 months ago (2010-06-29 10:50:09 UTC) #2
William Hesse
LGTM.
10 years, 5 months ago (2010-06-29 11:00:20 UTC) #3
Lasse Reichstein
10 years, 5 months ago (2010-06-29 14:13:30 UTC) #4
The ia32 version has a case for integer32, that claims to also handle smis. I'm
not sure that's correct, though.

http://codereview.chromium.org/2834028/diff/1/3
File src/x64/codegen-x64.cc (right):

http://codereview.chromium.org/2834028/diff/1/3#newcode5349
src/x64/codegen-x64.cc:5349: dest->false_target()->Branch(equal);
I doubt it will happen in practice that we convert a value to boolean that we
*know* is a double.

I don't know whether we would want to do something for the known string case.
Again, I don't expect known string operation results to be used as booleans
much.

Maybe we should add a counter for the other special cases and see if they are
hit.

Powered by Google App Engine
This is Rietveld 408576698