net.sf.farrago.fennel.calc
Class CalcProgramBuilder.RegisterSets

java.lang.Object
  extended by net.sf.farrago.fennel.calc.CalcProgramBuilder.RegisterSets
Enclosing class:
CalcProgramBuilder

protected class CalcProgramBuilder.RegisterSets
extends Object

A place holder to hold defined register sets


Field Summary
private  List<List<CalcReg>> sets
           
 
Constructor Summary
CalcProgramBuilder.RegisterSets()
           
 
Method Summary
 void clear()
           
 List<CalcReg> getRegisterList(CalcProgramBuilder.RegisterSetType registerSetType)
          Returns the list of registers of a given type.
 CalcReg newRegister(CalcProgramBuilder.OpType opType, Object initValue, CalcProgramBuilder.RegisterSetType registerType, int storageBytes)
          Creates a register in a register set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sets

private final List<List<CalcReg>> sets
Constructor Detail

CalcProgramBuilder.RegisterSets

CalcProgramBuilder.RegisterSets()
Method Detail

clear

public void clear()

getRegisterList

public final List<CalcReg> getRegisterList(CalcProgramBuilder.RegisterSetType registerSetType)
Returns the list of registers of a given type.

Parameters:
registerSetType - Type of register
Returns:
list of registers of given type, never null

newRegister

public CalcReg newRegister(CalcProgramBuilder.OpType opType,
                           Object initValue,
                           CalcProgramBuilder.RegisterSetType registerType,
                           int storageBytes)
Creates a register in a register set

Parameters:
opType - what type the value in the register should have
initValue - initial value
registerType - specifies in which register set the register should live
Returns:
the newly created Register