coins
Class HirRoot

java.lang.Object
  extended bycoins.IrRoot
      extended bycoins.HirRoot

public class HirRoot
extends IrRoot

  HirRoot class is used to access HIR information and
  information prepared by other classes such as Sym, Flow, etc.
  This gives a trigger for accessing intermediate representation
  information such as the root of HIR tree, root of symbol table,
  and so on.
  HirRoot inherits ioRoot, symRoot, etc. from IrRoot.
  All HIR objects contain a reference to the HirRoot object
  from which intermediate representation information and methods
  can be quickly accessed.
  The HirRoot object contains a reference to IoRoot and SymRoot.
  Thus, every HIR objects can access information and methods of
  SymRoot, Sym and IoRoot.

 Coding rules in HirRoot

 Methods begin with lower case letter.
 Constants (final static int, etc.) are spelled in upper case letters.
 Indentation is 2 characters.
 Formal parameters begin with p.
 Local variables begin with l.
 Methods and variables are named so that meaning is easily guessed.
 Short names less than 3 characters are not used except for
 very local purpose.
 Protected or private fields starts with character f.
 Public fields of xxxRoot class might not start with character f.


Field Summary
 HIR hir
          hir: HIR instance used to invoke HIR methods in such way as hirRoot.hir.assignStmt(variableNode, expressionNode).
 HirModify hirModify
          hirModify: Used to modify HIR trees.
 HirRoot hirRoot
          Record the HirRoot instance so that it can be refered from others.
 SubpDefinition hirSubpDefinition
          hirSubpDefinition: Root of HIR tree representing current subprogram definition.
 MachineParam machineParam
          Reference to MachineParam copied from ioRoot
 SourceLanguage sourceLanguage
          Reference to SourceLanguage copied from SymRoot.
 Sym sym
          sym is an instance of Sym class used to access Sym methods such as creation of Sym instance, etc.
 
Fields inherited from class coins.IrRoot
fHirRoot, fInitiateIrCount, ioRoot, ir, irRoot, programRoot, symRoot
 
Constructor Summary
HirRoot(SymRoot pSymRoot)
          Constructor of the HirRoot class.
 
Method Summary
 void attachFlowRoot(FlowRoot pFlowRoot)
          attachFlowRoot: Attach FLowRoot information when it become available.
 java.util.Iterator emptyIterator()
           
 FlowRoot getFlowRoot()
          getFlowRoot: Get FlowRoot to access Flow information from HIR.
 SubpDefinition getSubpDefinition()
          getSubpDefinition: Get the subprogram definiton under current processing.
 void linkSubpDefinition(SubpDefinition pSubpDefinition)
          linkSubpDefinition: Record the subprogram definition under current processing.
 
Methods inherited from class coins.IrRoot
getHirRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hirRoot

public final HirRoot hirRoot
Record the HirRoot instance so that it can be refered from others.


hir

public final HIR hir
hir: HIR instance used to invoke HIR methods in such way as hirRoot.hir.assignStmt(variableNode, expressionNode).


sym

public final Sym sym
sym is an instance of Sym class used to access Sym methods such as creation of Sym instance, etc. from othe classes in such way as hirRoot.symRoot.sym.defineVar("abc".intern(), symRoot.typeInt).


hirModify

public final HirModify hirModify
hirModify: Used to modify HIR trees.


hirSubpDefinition

public SubpDefinition hirSubpDefinition
hirSubpDefinition: Root of HIR tree representing current subprogram definition.


sourceLanguage

public final SourceLanguage sourceLanguage
Reference to SourceLanguage copied from SymRoot.


machineParam

public final MachineParam machineParam
Reference to MachineParam copied from ioRoot

Constructor Detail

HirRoot

public HirRoot(SymRoot pSymRoot)
Constructor of the HirRoot class.

Method Detail

getFlowRoot

public FlowRoot getFlowRoot()
getFlowRoot: Get FlowRoot to access Flow information from HIR. It will be set by attachFlowRoot when FlowRoot information become available.


attachFlowRoot

public void attachFlowRoot(FlowRoot pFlowRoot)
attachFlowRoot: Attach FLowRoot information when it become available.


linkSubpDefinition

public void linkSubpDefinition(SubpDefinition pSubpDefinition)
linkSubpDefinition: Record the subprogram definition under current processing.


getSubpDefinition

public SubpDefinition getSubpDefinition()
getSubpDefinition: Get the subprogram definiton under current processing.


emptyIterator

public java.util.Iterator emptyIterator()