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

Issue 6879081: Added type recording for unary minus and unary bitwise negation. Note that the (Closed)

Created:
9 years, 8 months ago by Sven Panne
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Added type recording for unary minus and unary bitwise negation. Note that the type info itself is not used in crankshaft itself (yet). BUG=v8:1311

Patch Set 1 #

Total comments: 12

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : Hopefully final version of this patch... #

Total comments: 20

Patch Set 6 : Incorporated Florian's suggested changes #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+1637 lines, -336 lines) Patch
M src/arm/code-stubs-arm.h View 1 2 3 4 5 1 chunk +86 lines, -0 lines 0 comments Download
M src/arm/code-stubs-arm.cc View 1 2 3 4 5 3 chunks +308 lines, -4 lines 0 comments Download
M src/arm/full-codegen-arm.cc View 1 2 3 4 5 2 chunks +21 lines, -39 lines 0 comments Download
M src/ast.h View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M src/code-stubs.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M src/ia32/code-stubs-ia32.h View 1 2 3 4 5 1 chunk +88 lines, -0 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 4 5 2 chunks +476 lines, -145 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 3 4 5 2 chunks +21 lines, -39 lines 2 comments Download
M src/ic.h View 1 2 3 4 5 2 chunks +27 lines, -0 lines 0 comments Download
M src/ic.cc View 1 2 3 4 5 3 chunks +106 lines, -0 lines 0 comments Download
M src/log.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 4 chunks +9 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 2 chunks +13 lines, -0 lines 0 comments Download
M src/parser.cc View 1 2 3 4 5 3 chunks +3 lines, -2 lines 0 comments Download
M src/spaces.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/type-info.h View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M src/type-info.cc View 1 2 3 4 5 1 chunk +19 lines, -0 lines 0 comments Download
M src/x64/code-stubs-x64.h View 1 2 3 4 5 1 chunk +87 lines, -0 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 2 3 4 5 2 chunks +339 lines, -68 lines 2 comments Download
M src/x64/full-codegen-x64.cc View 1 2 3 4 5 2 chunks +21 lines, -37 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Sven Panne
9 years, 8 months ago (2011-04-20 17:53:47 UTC) #1
Erik Corry
Drive-by. http://codereview.chromium.org/6879081/diff/1/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): http://codereview.chromium.org/6879081/diff/1/src/arm/code-stubs-arm.cc#newcode1983 src/arm/code-stubs-arm.cc:1983: if (!mode_ == UNARY_OVERWRITE) { !mode_ == should ...
9 years, 8 months ago (2011-04-20 19:13:30 UTC) #2
Sven Panne
http://codereview.chromium.org/6879081/diff/1/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): http://codereview.chromium.org/6879081/diff/1/src/arm/code-stubs-arm.cc#newcode1983 src/arm/code-stubs-arm.cc:1983: if (!mode_ == UNARY_OVERWRITE) { On 2011/04/20 19:13:30, Erik ...
9 years, 8 months ago (2011-04-20 20:27:50 UTC) #3
Erik Corry
http://codereview.chromium.org/6879081/diff/1/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): http://codereview.chromium.org/6879081/diff/1/src/arm/code-stubs-arm.cc#newcode1983 src/arm/code-stubs-arm.cc:1983: if (!mode_ == UNARY_OVERWRITE) { On 2011/04/20 20:27:50, Sven ...
9 years, 8 months ago (2011-04-21 02:48:57 UTC) #4
Sven Panne
http://codereview.chromium.org/6879081/diff/1/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): http://codereview.chromium.org/6879081/diff/1/src/arm/code-stubs-arm.cc#newcode1987 src/arm/code-stubs-arm.cc:1987: __ AllocateHeapNumber(r2, r3, r4, r6, slow); On 2011/04/21 02:48:57, ...
9 years, 8 months ago (2011-04-21 05:12:18 UTC) #5
Sven Panne
http://codereview.chromium.org/6879081/diff/1/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): http://codereview.chromium.org/6879081/diff/1/src/arm/code-stubs-arm.cc#newcode1987 src/arm/code-stubs-arm.cc:1987: __ AllocateHeapNumber(r2, r3, r4, r6, slow); Before I continue ...
9 years, 8 months ago (2011-04-21 05:21:41 UTC) #6
Sven Panne
http://codereview.chromium.org/6879081/diff/1024/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): http://codereview.chromium.org/6879081/diff/1024/src/arm/code-stubs-arm.cc#newcode1988 src/arm/code-stubs-arm.cc:1988: __ bind(&slow_allocate_heapnumber); Hmmm, this seems to crash mjsunit/bit-not.js with ...
9 years, 8 months ago (2011-04-21 16:19:12 UTC) #7
Erik Corry
On 2011/04/21 16:19:12, Sven wrote: > http://codereview.chromium.org/6879081/diff/1024/src/arm/code-stubs-arm.cc > File src/arm/code-stubs-arm.cc (right): > > http://codereview.chromium.org/6879081/diff/1024/src/arm/code-stubs-arm.cc#newcode1988 > ...
9 years, 8 months ago (2011-04-22 18:45:09 UTC) #8
fschneider
The problem is that you're missing recording of the source position in the full-codegen. But ...
9 years, 8 months ago (2011-04-26 13:32:52 UTC) #9
Sven Panne
After some testing, I'll upload a new version with the changes... http://codereview.chromium.org/6879081/diff/10001/src/ia32/code-stubs-ia32.cc File src/ia32/code-stubs-ia32.cc (right): ...
9 years, 8 months ago (2011-04-27 00:45:54 UTC) #10
fschneider
Looks pretty good now. LGTM with some small comments. I'm also fine if you want ...
9 years, 8 months ago (2011-04-27 11:34:36 UTC) #11
Sven Panne
9 years, 8 months ago (2011-04-27 17:19:31 UTC) #12
http://codereview.chromium.org/6879081/diff/10001/src/ia32/full-codegen-ia32.cc
File src/ia32/full-codegen-ia32.cc (right):

http://codereview.chromium.org/6879081/diff/10001/src/ia32/full-codegen-ia32....
src/ia32/full-codegen-ia32.cc:3744: // TODO(svenpanne): Allowing format strings
in Comment would be nice here...
OK, I'll have a look, especially if the change is really worth it, but this
would be in another change, anyway.

http://codereview.chromium.org/6879081/diff/10001/src/ia32/full-codegen-ia32....
src/ia32/full-codegen-ia32.cc:3752:
VisitForAccumulatorValue(expr->expression());
I'll investigate this later, and I wanted to do this in a separate change (if
any), anyway. Is the AST really kept around for an extended period of time? If
not, pulling the position into Expression (or even higher in the class
hierarchy) seems to be the the right thing. Even if the position is not used for
some kind of nodes, I like simple rules like "every expression has a position"
instead of having crankshaft silently generate obscure code. :-)

http://codereview.chromium.org/6879081/diff/10001/src/ia32/full-codegen-ia32....
src/ia32/full-codegen-ia32.cc:3753: __ CallStub(&stub);
On 2011/04/27 11:34:36, fschneider wrote:
> [...] It's probably good to add inlined smi code for SUB and BIT_NOT as a
separate change.

OK, I'll keep this in mind...

http://codereview.chromium.org/6879081/diff/16001/src/ia32/full-codegen-ia32.cc
File src/ia32/full-codegen-ia32.cc (left):

http://codereview.chromium.org/6879081/diff/16001/src/ia32/full-codegen-ia32....
src/ia32/full-codegen-ia32.cc:3733: GenericUnaryOpStub stub(Token::SUB,
overwrite, NO_UNARY_FLAGS);
On 2011/04/27 11:34:36, fschneider wrote:
> Please remove the code for the GenericUnaryOpStub (in code-stubs.h, etc.),
since it is not used anymore after your change.

I already have exactly this on my TODO list, plus a few other minor cleanups. I
want to do each cleanup in a small, separate change to avoid monster commits
like this one.

http://codereview.chromium.org/6879081/diff/16001/src/x64/code-stubs-x64.cc
File src/x64/code-stubs-x64.cc (right):

http://codereview.chromium.org/6879081/diff/16001/src/x64/code-stubs-x64.cc#n...
src/x64/code-stubs-x64.cc:455: void
TypeRecordingUnaryOpStub::GenerateSmiStubSub(MacroAssembler* masm) {
On 2011/04/27 11:34:36, fschneider wrote:
> I'm not convinced that all the short helpers like this one, that are used
exactly in one place, buy us much.

Perhaps they are a little bit small, but they avoid copy-n-paste of machine code
generation, and you can easily see the structure of the stubs.

> If you plan to refactor these helpers anyway, it's ok to do this as a separate
change later.

I have some ideas here, let's see if there's time...

Powered by Google App Engine
This is Rietveld 408576698