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.
http://codereview.chromium.org/6237002/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev