net.sf.farrago.fennel.calc
Class CalcRexImplementorTableImpl.IdentityImplementor

java.lang.Object
  extended by net.sf.farrago.fennel.calc.CalcRexImplementorTableImpl.IdentityImplementor
All Implemented Interfaces:
CalcRexImplementor
Enclosing class:
CalcRexImplementorTableImpl

private static class CalcRexImplementorTableImpl.IdentityImplementor
extends Object
implements CalcRexImplementor

Implements the identity operator.

The prefix plus operator uses this implementor, because "+ x" is always the same as "x".


Constructor Summary
private CalcRexImplementorTableImpl.IdentityImplementor()
           
 
Method Summary
 boolean canImplement(RexCall call)
           
 CalcReg implement(RexCall call, RexToCalcTranslator translator)
          Generates instructions to implement this call, and returns the register which holds the result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalcRexImplementorTableImpl.IdentityImplementor

private CalcRexImplementorTableImpl.IdentityImplementor()
Method Detail

implement

public CalcReg implement(RexCall call,
                         RexToCalcTranslator translator)
Description copied from interface: CalcRexImplementor
Generates instructions to implement this call, and returns the register which holds the result.

Specified by:
implement in interface CalcRexImplementor

canImplement

public boolean canImplement(RexCall call)
Specified by:
canImplement in interface CalcRexImplementor