coins.aflow
クラス IrAdapter

java.lang.Object
  |
  +--coins.aflow.IrAdapter
すべての実装インタフェース:
java.lang.Cloneable, IR, IR0
直系の既知のサブクラス:
DefUseCell.DefNode

class IrAdapter
extends java.lang.Object
implements IR


フィールドの概要
 
インタフェース coins.ir.IR から継承したフィールド
OP_CODE_NAME, OP_INF, OP_LIST, OP_PROG, OP_SUBP_DEF
 
コンストラクタの概要
IrAdapter()
          Creates new IrAdatper
 
メソッドの概要
 void addInf(java.lang.String pInfIdInterned, java.lang.Object pInfObject)
          addInf Add (attach) information pInfObject to this IR node.
 void attachInf(IR pNode)
           
 IR buildNode(int pOperator)
           
 IR buildNode(int pOperator, IR pSource1)
           
 IR buildNode(int pOperator, IR pSource1, IR pSource2)
           
 IR buildSymNode(Sym pSym)
           
 IR getChild(int pNumber)
          getChild
 IR getChild1()
          getChild1 Get the first child of this node.
 IR getChild2()
          getChild2 Get the second child of this node.
 int getChildCount()
          getChildCount Get the number of children that may be attached to this node.
 FlowAnalSym getFlowAnalSym()
           
 java.lang.String getIndentSpace(int pIndent)
           
 int getIndex()
          getIndex Get the index number assigned to "this" node.
 java.lang.Object getInf(java.lang.String pInfIdInterned)
          getInf Get the information of the kind pInfKindInterned.
 IrList getInfList()
          getInfList Get the information list attached to this node.
 IrList getInfList(java.lang.String pString)
           
 IR getInfNode()
           
 java.lang.String getInfString()
           
 java.lang.String getInfString(java.lang.String pString)
           
 java.lang.String getIrName()
           
 int getOperator()
          getOperator Get operation code of "this" node.
 IR getParent()
          getParent Get the parent of this node.
 Sym getResultOperand()
           
 Sym getResultVar()
           
 IR getSourceNode(int pNumber)
           
 IR getSourceNode1()
           
 IR getSourceNode2()
           
 Sym getSym()
          getSym Get the symbol represented by "this" node if this is a node representing a symbol (simple variable, element/field name, subprogram, label, constant, etc.).
 java.lang.Object getWork()
           
 void print(int pIndent)
          print Print this subtree in text format traversing all children of this node.
 void print(int pIndent, boolean pDetail)
          print Print this subtree in text format traversing all children of this node.
 void removeInf(java.lang.String pInfIdInterned)
          removeInf Remove the information of the kind pInfKindInterned.
 void replaceOperator(int pOperator)
           
 void replaceResultOperand(IR pOperand)
           
 void replaceResultVar(IR pOperand)
           
 void replaceSource(int pNumber, IR pOperand)
           
 void replaceSource1(IR pOperand)
           
 void replaceSource2(IR pOperand)
           
 void replaceThisNode(IR pNewNode)
           
 void setChild(int pNumber, IR pIr)
          setChild Set pHir as pNumber-th child of this node.
 void setChild1(IR p1)
           
 void setChild2(IR p2)
           
 void setIndex(int pIndex)
           
 void setInfList(java.lang.String pInfIdInterned, IrList pInfList)
           
 void setInfString(java.lang.String pInfIdInterned, java.lang.String pInfString)
           
 void setParent(IR pParent)
           
 void setWork(java.lang.Object pObject)
           
 java.lang.String toStringShort()
          setChild Set pHir as pNumber-th child of this node.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

IrAdapter

public IrAdapter()
Creates new IrAdatper

メソッドの詳細

replaceSource2

public void replaceSource2(IR pOperand)

buildNode

public IR buildNode(int pOperator)

getChild1

public IR getChild1()
インタフェース IR の記述:
getChild1 Get the first child of this node. (This method does the same operation as getChild(1) but it may be more efficient.)

定義:
インタフェース IR 内の getChild1
戻り値:
the child 1 of this node.

replaceSource1

public void replaceSource1(IR pOperand)

replaceOperator

public void replaceOperator(int pOperator)

setChild2

public void setChild2(IR p2)

getIndentSpace

public java.lang.String getIndentSpace(int pIndent)

replaceResultVar

public void replaceResultVar(IR pOperand)

setChild1

public void setChild1(IR p1)

getSym

public Sym getSym()
インタフェース IR の記述:
getSym Get the symbol represented by "this" node if this is a node representing a symbol (simple variable, element/field name, subprogram, label, constant, etc.).

定義:
インタフェース IR 内の getSym
戻り値:
the symbol represented by "this" node. In HIR, it is Var if VarNode Subp if SubpNode, Label if LabelNode or LabelDef Elem if ElemNode // Field if FieldNode Const if ConstNode. If "this" node does not represent any symbol, then return null. (If "this" is HIR leaf or nonleaf node, the symbol attached to the node is returned. If "this" has no symbol attached, then return null. If "this" is LIR node representing a symbol, the symbol is returned. If "this" is LIR computation node, null is returned.)

getSourceNode

public IR getSourceNode(int pNumber)

setParent

public void setParent(IR pParent)

getSourceNode2

public IR getSourceNode2()

getSourceNode1

public IR getSourceNode1()

buildNode

public IR buildNode(int pOperator,
                    IR pSource1)

buildNode

public IR buildNode(int pOperator,
                    IR pSource1,
                    IR pSource2)

getChildCount

public int getChildCount()
インタフェース IR0 の記述:
getChildCount Get the number of children that may be attached to this node. Abbreviated child (null child) is also counted.

定義:
インタフェース IR0 内の getChildCount
戻り値:
the number of children of this node.

getOperator

public int getOperator()
インタフェース IR0 の記述:
getOperator Get operation code of "this" node.

定義:
インタフェース IR0 内の getOperator
戻り値:
the operation code (value of operator field) of "this" node.

print

public void print(int pIndent)
インタフェース IR の記述:
print Print this subtree in text format traversing all children of this node. "this" may be any subtree (it may be a leaf node).

定義:
インタフェース IR 内の print
パラメータ:
pIndent - number of heading spaces for indentation.

replaceSource

public void replaceSource(int pNumber,
                          IR pOperand)

getIrName

public java.lang.String getIrName()

getResultVar

public Sym getResultVar()

getInfNode

public IR getInfNode()

buildSymNode

public IR buildSymNode(Sym pSym)

setIndex

public void setIndex(int pIndex)

attachInf

public void attachInf(IR pNode)

getParent

public IR getParent()
インタフェース IR の記述:
getParent Get the parent of this node.

定義:
インタフェース IR 内の getParent
戻り値:
the parent of this node. If this has no parent, return null.

print

public void print(int pIndent,
                  boolean pDetail)
インタフェース IR の記述:
print Print this subtree in text format traversing all children of this node. "this" may be any subtree (it may be a leaf node).

定義:
インタフェース IR 内の print
パラメータ:
pIndent - number of heading spaces for indentation.
pDetail - true if detail print is requested, false otherwise.

replaceThisNode

public void replaceThisNode(IR pNewNode)

setChild

public void setChild(int pNumber,
                     IR pIr)
インタフェース IR0 の記述:
setChild Set pHir as pNumber-th child of this node.

定義:
インタフェース IR0 内の setChild
パラメータ:
pNumber - Child number

getIndex

public int getIndex()
インタフェース IR0 の記述:
getIndex Get the index number assigned to "this" node. (The index number is used to refer the node in data flow analysis and debug-print.)

定義:
インタフェース IR0 内の getIndex
戻り値:
the index number assigned to "this" node. If the node has no index number, return 0.

getChild

public IR getChild(int pNumber)
インタフェース IR0 の記述:
getChild

定義:
インタフェース IR0 内の getChild
パラメータ:
pNumber - the child number of the child to be returned.
戻り値:
the specified child of this node.

getChild2

public IR getChild2()
インタフェース IR の記述:
getChild2 Get the second child of this node. (This method does the same operation as getChild(2) but it may be more efficient.)

定義:
インタフェース IR 内の getChild2
戻り値:
the child 2 of this node.

setInfList

public void setInfList(java.lang.String pInfIdInterned,
                       IrList pInfList)

setInfString

public void setInfString(java.lang.String pInfIdInterned,
                         java.lang.String pInfString)

addInf

public void addInf(java.lang.String pInfIdInterned,
                   java.lang.Object pInfObject)
インタフェース IR の記述:
addInf Add (attach) information pInfObject to this IR node. If information of the same kind is already exists in this node, then the old one is replaced with the new one (pInfObject).

定義:
インタフェース IR 内の addInf
パラメータ:
pInfObject - Object to be added as information. It may be String, Sym, IR, List, and so on, hence they may be non-IR elements.

getInfList

public IrList getInfList()
インタフェース IR の記述:
getInfList Get the information list attached to this node. If no information is added, then null is returned. You can see if information is added or not by if (node.getInfList() == null) .... This method is prepared for persons who knows well the inside of the compiler. In ordinary usage, this method is unnecessary to be used. If you want to see the contents of the list, you should know the structure of the list defined in HirAnnex and LirAnnex.

定義:
インタフェース IR 内の getInfList

getInfList

public IrList getInfList(java.lang.String pString)

getInfString

public java.lang.String getInfString()

getInfString

public java.lang.String getInfString(java.lang.String pString)

getInf

public java.lang.Object getInf(java.lang.String pInfIdInterned)
インタフェース IR の記述:
getInf Get the information of the kind pInfKindInterned. If there is no information of the specified kind, then null is returned. The kind names are listed in coins.Registry class. It should be interned (in such way as "coins_pragma".intern()). If there is no information of the kind pInfKindInterned, then return null. Note that the value returned by getInf is not restricted to IR objects but it may be Sym, Const, String.

定義:
インタフェース IR 内の getInf
戻り値:
the object of the specified kind attached to this node.

removeInf

public void removeInf(java.lang.String pInfIdInterned)
インタフェース IR の記述:
removeInf Remove the information of the kind pInfKindInterned. If there is no information of the specified kind, then no effect remains.

定義:
インタフェース IR 内の removeInf

getFlowAnalSym

public FlowAnalSym getFlowAnalSym()

getResultOperand

public Sym getResultOperand()

replaceResultOperand

public void replaceResultOperand(IR pOperand)

setWork

public void setWork(java.lang.Object pObject)

getWork

public java.lang.Object getWork()

toStringShort

public java.lang.String toStringShort()
インタフェース IR の記述:
setChild Set pHir as pNumber-th child of this node.

定義:
インタフェース IR 内の toStringShort