net.sf.farrago.fennel.calc
Class CalcReg
java.lang.Object
net.sf.farrago.fennel.calc.CalcReg
- All Implemented Interfaces:
- CalcProgramBuilder.Operand
public class CalcReg
- extends Object
- implements CalcProgramBuilder.Operand
Represents a virtual register. Each register lives in a register set of type
CalcProgramBuilder.RegisterSetType
Each register is of type CalcProgramBuilder.OpType
- Since:
- Jan 11, 2004
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/fennel/calc/CalcReg.java#1 $
- Author:
- jhyde
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
opType
final CalcProgramBuilder.OpType opType
value
final Object value
registerType
CalcProgramBuilder.RegisterSetType registerType
storageBytes
int storageBytes
- Number of bytes storage to allocate for this value.
index
int index
CalcReg
CalcReg(CalcProgramBuilder.OpType opType,
Object value,
CalcProgramBuilder.RegisterSetType registerType,
int storageBytes,
int index)
getOpType
public final CalcProgramBuilder.OpType getOpType()
getRegisterType
final CalcProgramBuilder.RegisterSetType getRegisterType()
getIndex
final int getIndex()
getValue
final Object getValue()
printValue
void printValue(PrintWriter writer,
boolean outputComments)
- Serializes the
value
in the virtual register if not null
NOTE See also print(java.io.PrintWriter)
which serializes the "identity" of
the register
- Parameters:
writer
- outputComments
-
print
public final void print(PrintWriter writer)
- Serializes the identity of the register. It does not attempt to serialize
its value; see
printValue(java.io.PrintWriter, boolean)
for that.
- Specified by:
print
in interface CalcProgramBuilder.Operand
- Parameters:
writer
-