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

Issue 6237002: Remove the remaining LOperand-members from concrete LIR instructions.... (Closed)

Created:
9 years, 11 months ago by fschneider
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Remove the remaining LOperand-members from concrete LIR instructions. This change introduces the third template parameters for LIR instructions to specify the number of temp-operands. This is one step towards removing the instruction-summaries. I also added hydrogen-accessors in more places and refactored the LIR-branch instructions to have common super-classes to avoid code duplication. Added MUST_USE_RESULT to the functions that record uses and definitions so that all LOperands are stored in the LIR instructions (and not only in the summaries). Committed: http://code.google.com/p/v8/source/detail?r=6345

Patch Set 1 #

Total comments: 19

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : rebased #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+664 lines, -749 lines) Patch
M src/ia32/lithium-codegen-ia32.cc View 1 2 3 4 71 chunks +121 lines, -121 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 3 4 5 6 34 chunks +485 lines, -556 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 2 3 4 16 chunks +58 lines, -72 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
fschneider
It's a pretty big CL - but there it concerns a lot of boilerplate code ...
9 years, 11 months ago (2011-01-12 22:25:19 UTC) #1
Kevin Millikin (Chromium)
I've got just a few comments on this. http://codereview.chromium.org/6237002/diff/1/src/ia32/lithium-ia32.cc File src/ia32/lithium-ia32.cc (right): http://codereview.chromium.org/6237002/diff/1/src/ia32/lithium-ia32.cc#newcode89 src/ia32/lithium-ia32.cc:89: stream->Add(" ...
9 years, 11 months ago (2011-01-13 08:45:59 UTC) #2
Vitaly Repeshko
Drive by suggestion. http://codereview.chromium.org/6237002/diff/1/src/ia32/lithium-ia32.h File src/ia32/lithium-ia32.h (right): http://codereview.chromium.org/6237002/diff/1/src/ia32/lithium-ia32.h#newcode533 src/ia32/lithium-ia32.h:533: this->SetInputAt(0, left); We could have a ...
9 years, 11 months ago (2011-01-13 11:44:07 UTC) #3
fschneider
Addressed comments. http://codereview.chromium.org/6237002/diff/1/src/ia32/lithium-ia32.cc File src/ia32/lithium-ia32.cc (right): http://codereview.chromium.org/6237002/diff/1/src/ia32/lithium-ia32.cc#newcode89 src/ia32/lithium-ia32.cc:89: stream->Add(" = "); On 2011/01/13 08:45:59, Kevin ...
9 years, 11 months ago (2011-01-13 13:03:25 UTC) #4
Vitaly Repeshko
http://codereview.chromium.org/6237002/diff/1/src/ia32/lithium-ia32.h File src/ia32/lithium-ia32.h (right): http://codereview.chromium.org/6237002/diff/1/src/ia32/lithium-ia32.h#newcode533 src/ia32/lithium-ia32.h:533: this->SetInputAt(0, left); On 2011/01/13 13:03:25, fschneider wrote: > On ...
9 years, 11 months ago (2011-01-13 13:06:51 UTC) #5
fschneider
9 years, 11 months ago (2011-01-17 11:44:28 UTC) #6
On 2011/01/13 13:06:51, Vitaly wrote:
> http://codereview.chromium.org/6237002/diff/1/src/ia32/lithium-ia32.h
> File src/ia32/lithium-ia32.h (right):
> 
>
http://codereview.chromium.org/6237002/diff/1/src/ia32/lithium-ia32.h#newcode533
> src/ia32/lithium-ia32.h:533: this->SetInputAt(0, left);
> On 2011/01/13 13:03:25, fschneider wrote:
> > On 2011/01/13 11:44:07, Vitaly wrote:
> > > We could have a convenience function SetInputs(inputs...) defined for up
to
> > > certain number of input operands, so that in all instruction subclasses we
> > could
> > > write:
> > > LSubclass(LOperand* op1, ..., LOperand* opN) {
> > >   this->SetInputs(op1, ..., opN);
> > > }
> > > This could also be done for temps.
> > 
> > For this change I'd like to leave it more verbose - but I'm open for
> > improvements for the future.
> > 
> > I don't think I can make the number of parameters depend on a template
> > parameter, so these would need to be virtual? (which I want to avoid) -
maybe
> a
> > macro would work?
> 
> To implement this you define the function N times (for 1 to N arguments) and
> rely on the nice property that unused parts of a template are not instantiated
> and so their presence won't cause an error.

That would work. - but I'm not yet sure if we may get rid of constructors
completely in the future, so I rather wait with this. For now it's not that much
boilerplate code.

Powered by Google App Engine
This is Rietveld 408576698