coins.ir.hir
Class HirAnnex

java.lang.Object
  extended bycoins.ir.hir.HirAnnex

public class HirAnnex
extends java.lang.Object

class HirAnnex Additional information that is not given in some case and not given to some nodes.


Field Summary
protected  ExpId fExpId
           
protected  FlagBox fFlagBox
           
protected  int fIndexNo
           
protected  IrList fInfList
           
protected  java.lang.Object fWork
           
 HirRoot hirRoot
           
 
Constructor Summary
HirAnnex(HirRoot pHirRoot)
           
 
Method Summary
 void addInf(java.lang.String pInfKindInterned, java.lang.Object pInfObject)
          Add pInfObject as the information attached to this annex.
 java.lang.Object clone()
          clone Override Object.clone in HIR.
 boolean flagsAreAllFalse()
           
(package private)  boolean getFlag(int pFlagNumber)
          getFlag returns the value (true/false) of the flag indicated by pFlagNumber.
 FlagBox getFlagBox()
          Get the flag box attached to this annex.
 int getIndex()
          Get the index number attached to the HIR node correponding to this annex.
 java.lang.Object getInf(java.lang.String pInfKindInterned)
          Get the information of the kind pInfKindInterned.
 IrList getInfList()
          Get the list of information.
 java.lang.Object getWork()
          Get the information in work set by setWork.
 void removeInf(java.lang.String pInfKindInterned)
          Remove the information of the kind pInfKindInterned.
(package private)  void setFlag(int pFlagNumber, boolean pYesNo)
          setFlag setFlag sets the flag of specified number.
 void setIndex(int pIndex)
          Set pIndex as the index number attached to the HIR node corresponding to this annex.
 void setWork(java.lang.Object pWork)
          Set pWork as the information that is used for arbitrary purpose in each phase.
 java.lang.String toString()
           
 java.lang.String toStringInf()
          Get the information attached to this annex in the form of String.
protected  java.lang.String toStringInfList(IrList pInfList)
          Change the list of information to String.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hirRoot

public final HirRoot hirRoot

fFlagBox

protected FlagBox fFlagBox

fIndexNo

protected int fIndexNo

fExpId

protected ExpId fExpId

fInfList

protected IrList fInfList

fWork

protected java.lang.Object fWork
Constructor Detail

HirAnnex

public HirAnnex(HirRoot pHirRoot)
Method Detail

getFlag

boolean getFlag(int pFlagNumber)
getFlag returns the value (true/false) of the flag indicated by pFlagNumber.

Parameters:
pFlagNumber - flag identification number. As for detail, see getFlag of HIR.

setFlag

void setFlag(int pFlagNumber,
             boolean pYesNo)
setFlag setFlag sets the flag of specified number.

Parameters:
pFlagNumber - flag identification number. As for detail, see getFlag of HIR.
pYesNo - true or false to be set to the flag.

flagsAreAllFalse

public boolean flagsAreAllFalse()
Returns:
true if all flags are false, else return false.

getFlagBox

public FlagBox getFlagBox()
Get the flag box attached to this annex. See also the flags FLAG_xx defined in HIR (HIR0).

Returns:
the flag box.

addInf

public void addInf(java.lang.String pInfKindInterned,
                   java.lang.Object pInfObject)
Add pInfObject as the information attached to this annex. Its information kind is pInfKindInterned.

Parameters:
pInfKindInterned - String constant showing the kind of information (it should be unique (intern()).
pInfObject - Information to be attached.

getInf

public java.lang.Object getInf(java.lang.String pInfKindInterned)
Get the information of the kind pInfKindInterned.

Parameters:
pInfKindInterned - shows the kind of information (it should be unique (intern()).
Returns:
the information (null if not attached).

removeInf

public void removeInf(java.lang.String pInfKindInterned)
Remove the information of the kind pInfKindInterned.

Parameters:
pInfKindInterned - show the kind of informaiotn.

getInfList

public IrList getInfList()
Get the list of information.

Returns:
the list of information.

setWork

public void setWork(java.lang.Object pWork)
Set pWork as the information that is used for arbitrary purpose in each phase. The information in work may be destroyed by other phases.

Parameters:
pWork - represents the information to be set.

getWork

public java.lang.Object getWork()
Get the information in work set by setWork.

Returns:
the information in work.

getIndex

public int getIndex()
Get the index number attached to the HIR node correponding to this annex.

Returns:
the index number.

setIndex

public void setIndex(int pIndex)
Set pIndex as the index number attached to the HIR node corresponding to this annex.

Parameters:
pIndex - index number to be set.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
clone Override Object.clone in HIR.

Returns:
cloned HirAnnex.
Throws:
java.lang.CloneNotSupportedException

toString

public java.lang.String toString()

toStringInf

public java.lang.String toStringInf()
Get the information attached to this annex in the form of String.

Returns:
the information changed to String.

toStringInfList

protected java.lang.String toStringInfList(IrList pInfList)
Change the list of information to String.

Parameters:
pInfList - list of information.
Returns:
the String showing the information.