coins.ir.hir
クラス HIR_Impl

java.lang.Object
  |
  +--coins.ir.hir.HIR_Impl
すべての実装インタフェース:
java.lang.Cloneable, HasStringObject, HIR, HIR0, IR, IR0
直系の既知のサブクラス:
ExpImpl, HirListImpl, HirModify, HirSeqImpl, InfNodeImpl, LabelDefImpl, ProgramImpl, StmtImpl, SubpDefinitionImpl

public class HIR_Impl
extends java.lang.Object
implements HIR, HasStringObject, java.lang.Cloneable

HIR_Impl class


フィールドの概要
protected  IR[] fAdditionalChild
           
protected  int fChildCount
           
protected  IR fChildNode1
           
protected  IR fChildNode2
           
protected  int fDbgLevel
           
protected  HirAnnex fHirAnnex
           
protected  int fOperator
           
protected  IR fParentNode
           
protected  Type fType
           
 HirRoot hirRoot
           
(パッケージプライベート) static int[] inversionTable
           
protected static MachineParam machineParam
           
protected static SourceLanguage sourceLanguage
           
 
インタフェース coins.ir.hir.HIR から継承したフィールド
OP_CODE_NAME, OP_CODE_NAME_DENSE
 
インタフェース coins.ir.IR から継承したフィールド
OP_INF, OP_LIST, OP_PROG, OP_SUBP_DEF
 
インタフェース coins.ir.hir.HIR0 から継承したフィールド
FLAG_C_PTR, FLAG_CONST_EXP, FLAG_INIT_BLOCK, FLAG_LOOP_WITH_CONDITIONAL_INIT, FLAG_NOCHANGE, FLAG_NONTERMINAL, OP_ADD, OP_ADD_ASSIGN, OP_ADDR, OP_AND, OP_AND_ASSIGN, OP_ARROW, OP_ASM, OP_ASSIGN, OP_BLOCK, OP_CALL, OP_CMP_EQ, OP_CMP_GE, OP_CMP_GT, OP_CMP_LE, OP_CMP_LT, OP_CMP_NE, OP_COMMA, OP_CONST, OP_CONTENTS, OP_CONV, OP_DECAY, OP_DIV, OP_DIV_ASSIGN, OP_ELEM, OP_ENCLOSE, OP_EQ_ZERO, OP_EXP_STMT, OP_EXPLIST, OP_EXPREPEAT, OP_FOR, OP_IF, OP_INDEX, OP_INDEXED_LOOP, OP_JUMP, OP_LABEL, OP_LABEL_DEF, OP_LABELED_STMT, OP_LG_AND, OP_LG_OR, OP_MOD, OP_MOD_ASSIGN, OP_MULT, OP_MULT_ASSIGN, OP_NEG, OP_NOT, OP_NULL, OP_OFFSET, OP_OR, OP_OR_ASSIGN, OP_PARAM, OP_PHI, OP_POST_DECR, OP_POST_INCR, OP_PRE_DECR, OP_PRE_INCR, OP_QUAL, OP_REPEAT, OP_RETURN, OP_SELECT, OP_SEQ, OP_SETDATA, OP_SHIFT_L_ASSIGN, OP_SHIFT_LL, OP_SHIFT_R, OP_SHIFT_R_ASSIGN, OP_SHIFT_RL, OP_SIZEOF, OP_STMT, OP_STMT_UPPER, OP_SUB, OP_SUB_ASSIGN, OP_SUBP, OP_SUBS, OP_SWITCH, OP_SYM, OP_TYPE, OP_UNDECAY, OP_UNTIL, OP_VAR, OP_WHILE, OP_XOR, OP_XOR_ASSIGN
 
コンストラクタの概要
  HIR_Impl()
          Default constructor
  HIR_Impl(HirRoot pHirRoot)
          Constructor to set hirRoot
protected HIR_Impl(HirRoot pHirRoot, int pOperator)
          Usually, HIR constructor should be given operation code.
 
メソッドの概要
 void accept(HirVisitor pVisitor)
          accept Acceptor used in HIR visitor.
 void addInf(java.lang.String pInfKindInterned, java.lang.Object pInfObject)
          addInf Add (attach) information pInfObject to this IR node.
 Exp addrExp(Exp pExp)
          addrExp Build addr expression representing the address of pExp.
 AsmStmt asmStmt(java.lang.String pInstructions, HirList pActualParamList)
          asmStmt Make a statement representing asm( formalParams, instructionList, actualParams ).
 AssignStmt assignStmt(Exp pLeft, Exp pRight)
          assignStmt Build an assignemnt statement.
 BlockStmt blockStmt(Stmt pStmtSequence)
          blockStmt Make an instance of block statement that may contain a sequence of statements.
 ExpStmt callStmt(Exp pSubpSpec, IrList pActualParamList)
          callStmt Build a subprogram call statement.
 void checkLinkage(java.lang.String pHeader)
          Check parent-child linkage if debug level (ioRoot.dbgHir.getLevel()) is greater than 0.
 java.lang.Object clone()
          clone Override Object.clone in HIR.
 Exp conditionalExp(Exp pExp)
          conditionalExp builds boolean expression to be used as conditional expression of IfStmt and LoopStmt.
 Exp conditionalExp1(Exp pExp)
           
 ConstNode constNode(Const pConst)
          constNode Make a ConstNode instance having constant symbol pConst.
 boolean contains(HIR pSubtree)
          Check if pSubtree is contained in this subtree.
 Exp contentsExp(Exp pPointerExp)
          contentsExp Build an expression that gets the contents pointed by pPointerExp.
 Exp convExp(Type pType, Exp pExp)
          convExp Build an expression to convert the type of pExp to pType.
 void copyInfListFrom(HIR pFromHir)
          Copy the contents of InfList attached to pFromHir to the InfList of this node.
 HIR copyWithOperands()
          copyWithOperands Make a subtree that is the same to this subtree.
 HIR copyWithOperandsChangingLabels(IrList pLabelCorrespondence)
          copyWithOperandsChangingLabels Copy this subtree changing labels that are defined in this subtree to avoid label duplication.
 void cutParentLink()
          cutParentLink Cut both links from/to parent node if they exist.
 void cutParentLink(int pChildNumber)
           
 Exp decayExp(Exp pExp)
          decayExp Build an expression that decay a vector to a pointer to vector element, or decay a String into a pointer to Char element.
 ElemNode elemNode(Elem pElem)
          elemNode Make an ElemNode instance having Elem symbol pElem.
 Exp exp(int pOperator, Exp pExp1)
          exp Build unary expression according to the operator given: OP_NOT // bitwise not (~) one's complement // logical not for bool (!)
 Exp exp(int pOperator, Exp pExp1, Exp pExp2)
          exp Build binary expression.
 Exp exp(int pOperator, Exp pExp1, Exp pExp2, Exp pExp3)
          exp: Build ternary expression (OP_SELECT, etc.).
 Exp expList(java.util.List pList)
          expList Make an expression representing a list of expressions, that is, make an instance of ExpListExp.
 Exp expRepeat(Exp pValue, Exp pCount)
          expRepeat Make an expression representing a list of expressions of the same value.
 ExpStmt expStmt(Exp pExp)
          expStmt Create a statement treating pExp as a statement.
 ConstNode falseNode()
          falseNode Make a ConstNode instance having boolean false value.
 void fatalError(int pId, java.lang.String pMessage)
           
 boolean finishHir()
           finishHir does closing operations for HIR.
 boolean flagsAreAllFalse()
           
 ForStmt forStmt(Stmt pInitStmt, Exp pCondition, Stmt pLoopBody, Stmt pStepPart)
           
 ForStmt forStmt(Stmt pInitStmt, Label pLoopBackLabel, Exp pCondition, Stmt pLoopBody, Label pLoopStepLabel, Stmt pStepPart, Label pLoopEndLabel)
           
 FunctionExp functionExp(Exp pFunctionSpec, IrList pActualParamList)
          functionExp Build a function expression node that computes function value.
 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.
 int getChildNumber()
          getChildNumber Get the child number of this node.
 IR getClone()
           
 ExpId getExpId()
          getExpId Get the expression identifier assigned to this node.
 boolean getFlag(int pFlagNumber)
          getFlag returns the value (true/false) of the flag indicated by pFlagNumber.
 FlagBox getFlagBox()
          getFlagBox Users are recommended to use getFlag( int pFlagNumber ) except when they understand the treatment of FlagBox in detail.
 FlowAnalSym getFlowAnalSym()
          getFlowAnalSym Get the flow analysis symbol assigned to this node if it is given.
 java.lang.String getIndentSpace(int pIndent)
          getIndentSace Get a sequence of spaces specified by pIndent.
 int getIndex()
          getIndex Get the index number assigned to "this" node.
 java.lang.Object getInf(java.lang.String pInfKindInterned)
          getInf Get the information of the kind pInfKindInterned.
 IrList getInfList()
          getInfList Get the information list attached to this node.
 java.lang.String getInfString()
          Get the string image of Inf.
 java.lang.String getIrName()
          getIrName Get operation name and node index to display node in compact form for flow analysis, debug, etc.
 HIR getNextNode()
          getNextNode is not recommended to be used in traversing HIR subtree because it has high overhead.
protected  HIR getNextNodeSeeingAncestor(HIR pHir)
           
 Stmt getNextStmt()
          getNextStmt Get statement next to this statement.
 int getOperator()
          getOperator Get operation code of "this" node.
 IR getParent()
          getParent Get the parent of this node.
 Sym getResultOperand()
           
 Sym getResultVar()
           
 HIR getSourceNode(int pNumber)
          getSourceNode Get the pNumber-th source operand of "this" node.
 HIR getSourceNode1()
          getSourceNode1 Get the 1st source operand node of "this" node where the source is an operand used/refered in "this" operation.
 HIR getSourceNode2()
          getSourceNode2 Get the 2nd source operand node of "this" node.
 Stmt getStmtContainingThisNode()
          getStmtContainingThisNode Get the innermost statement or LabeledStmt containing this node by traversing ancestors of this node.
 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.).
 FlowAnalSym getSymOrExpId()
          getSymOrExpId If this is a SymNode with FlowAnalSym instance, then return it else return getExpId().
 Type getType()
          getType Get the type attached to this node.
 java.lang.Object getWork()
          getWork Get information set by setWork for this node.
 HIR hirClone()
          hirClone Make the clone of this node to get a clone in the situation where clone() can not be used directly.
 HirIterator hirIterator(IR pSubtree)
          hirIterator Get an iterator to traverse all nodes or statements under pSubtree.
 HirList hirList()
           
 HIR hirNodeClone()
          Make a copy of this HIR node without copying children.
 HirSeq hirSeq(HIR pChild1)
          hirSeq Make an HirSeq node that have some definite number of children.
 HirSeq hirSeq(HIR pChild1, HIR pChild2)
          hirSeq Make an HirSeq node that have some definite number of children. //##59 (See HIR interface for HirSeq with more than 2 children.)
 HirSeq hirSeq(HIR pChild1, HIR pChild2, HIR pChild3)
          hirSeq Make an HirSeq node that have some definite number of children.
 IfStmt ifStmt(Exp pCondition, Stmt pThenPart, Stmt pElsePart)
          ifStmt Build an if-statement with then-part (pThenPart) and else-part (pElsePart).
 IndexedLoopStmt indexedLoopStmt(Var pLoopIndex, Exp pStartValue, Exp pEndValue, Exp pStepValue, boolean pUpward, Stmt pStmtBody)
           
 IndexedLoopStmt indexedLoopStmt(Var pLoopIndex, Exp pStartValue, Exp pEndValue, Exp pStepValue, Stmt pStmtBody)
           
 InfStmt infStmt(java.lang.String pInfKind, IrList pInfData)
          infStmt Build an InfStmt representing some information.
 InfStmt infStmt(java.lang.String pInfKind, java.lang.Object pInfData)
           
 ConstNode intConstNode(int pIntValue)
          intConstNode Make a ConstNode instance having pIntValue as its value.
 ConstNode intConstNode(long pIntValue)
          intConstNode Make a ConstNode instance having pIntValue as its value.
 IrList irList()
          irList Make an empty HirList node that make a LinkedList.
 IrList irList(java.util.LinkedList pList)
          irList Make an HirList node that makes a LinkedList.
 boolean isEmpty(HIR pHir)
          isEmpty Decide if pHir is empty or not, where empty means either null, NullNode, HIR with OP_NULL as its operator, LabeledStmt whose statement body isEmpty, or ExpStmt whose Exp part isEmpty.
 boolean isHIR()
          Test if this is an HIR object.
 boolean isLIR()
           
 boolean isSameAs(HIR pTree)
          isSameAs Compare this tree with pTree and if they have the same tree shape (same operator and same operands) then return true.
 boolean isStmt()
          isStmt
 boolean isSym()
          Test if this is a Sym object.
 boolean isTerminal()
           
 boolean isTree()
          isTree Test if this does not violates tree structure, that is, detect node adherence in branches and handshake miss in parent-child relation.
protected  boolean isTree(java.util.Set pVisitedNodes, int pErrorCounter, java.util.Set pSetOfLabels)
          isTree Test if this does not violates tree structure, that is, detect node adherence in branches and handshake miss in parent-child relation.
 JumpStmt jumpStmt(Label pLabelSym)
          jumpStmt Create a jump statement and increment reference count of pLabelSym.
 LabelDef labelDef(Label pLabel)
          labelDef Make a LabelDef instance that defines the label pLabel.
 LabeledStmt labeledStmt(Label pLabel, Stmt pStmt)
          labeledStmt Build labeled statement using pLabel as its label and pStmt as its statement body.
 LabelNode labelNode(Label pLabel)
          labelNode Make a LabelNode instance having Label symbol pLabel.
 NullNode nullNode()
          nullNode Make a NullNode instance.
 Stmt nullStmt()
          nullStmt Make a statement having NullNode as its statement body.
 ConstNode offsetConstNode(long pIntValue)
          offsetConstNode Make a ConstNode instance having pIntValue as its offset value.
 PhiExp phiExp(Var pVar, Label pLabel)
          phiExp Make a phi expression used in SSA.
 PointedExp pointedExp(Exp pStructUnionExp, ElemNode pElemNode)
          pointedExp Build a pointed expression.
 void print(int pIndent)
          Print the object.
 void print(int pIndent, boolean pDetail)
          Print the object.
 Program program(Sym pProgSym, SymTable pGlobalSymTable, IR pInitiationPart, IrList pSubpList)
          program Make a program node.
 QualifiedExp qualifiedExp(Exp pStructUnionExp, ElemNode pElemNode)
          qualifiedExp Build a qualified expression.
 void removeInf(java.lang.String pInfKindInterned)
          removeInf Remove the information of the kind pInfKindInterned.
 RepeatStmt repeatStmt(Label pLoopBackLabel, Stmt pLoopBody, Label pLoopStepLabel, Exp pCondition, Label pLoopEndLabel)
           
 RepeatStmt repeatStmt(Stmt pLoopBody, Exp pCondition)
           
 void replaceOperator(int pOperator)
           
 void replaceResultOperand(HIR pOperand)
           
 void replaceResultVar(HIR pOperand)
           
 HIR replaceSource(int pNumber, IR pOperand)
          replaceSource Replace pNumber-th source operand of "this" node by pOperand.
 HIR replaceSource1(HIR pOperand)
          replaceSource1 Replace the source operand 1 of "this" node by pOperand.
 HIR replaceSource2(HIR pOperand)
          replaceSource2 Replace the source operand 2 of "this" node by pOperand.
 HIR replaceThisNode(HIR pNewNode)
          replaceThisNode Replace "this" node by pNewNode.
 ReturnStmt returnStmt()
          returnStmt Build return statement that terminates the execution of current subprogram under construction.
 ReturnStmt returnStmt(Exp pReturnValue)
          returnStmt Build return statement that terminates the execution of current subprogram under construction.
 void setChild(int pNumber, IR pHir)
          setChild Set pHir as pNumber-th child of this node.
 void setChild1(IR pChild)
           
 void setChild2(IR pChild)
           
 void setChildren(IR p1, IR p2)
           
 void setChildren(IR p1, IR p2, IR p3)
           
 void setChildren(IR p1, IR p2, IR p3, IR p4)
           
 void setChildren(IR p1, IR p2, IR p3, IR p4, IR p5)
           
 SetDataStmt setDataStmt(Exp pVariable, Exp pValueExp)
          setDataStmt Make the statement that sets initial value or a list of initial values (pValueExp) to a variable (pVariable).
 void setFlag(int pFlagNumber, boolean pYesNo)
          setFlag setFlag sets the flag of specified number.
 void setIndex(int pIndex)
          setIndex Set an index number to "this" node.
 int setIndexNumberToAllNodes(int pStartNumber)
          setIndexNumberToAllNodes Set sequencial index number to all nodes traversing the subtree rooted by this node in depth-first order.
 int setIndexNumberToAllNodes(int pStartNumber, boolean pResetSymIndex)
          Set index number to all nodes and if pResetSymIndex is true, reset Sym index by resetFlowAnalInf for FlowAnalSym nodes.
 int setIndexNumberToAllNodes2(int pStartNumber, boolean pResetSymIndex)
           
 void setParameters(MachineParam pMachineParam, SourceLanguage pSourceLanguage)
           
 void setParent(IR pParent)
          setParent Set the parent of this node as pParent.
 void setType(Type pType)
          setType Attach a type to this node.
 void setWork(java.lang.Object pWork)
          setWork Set information privately used in each phase.
 void severeError(int pId, java.lang.String pMessage)
           
 Exp sizeofExp(Exp pExp)
          sizeofExp Build the expression that get the size of pExp.
 Exp sizeofExp(Type pType)
          sizeofExp Build the expression that get the size of pType.
 void slightError(int pId, java.lang.String pMessage)
           
 SubpDefinition subpDefinition(Subp pSubpSym)
           
 SubpDefinition subpDefinition(Subp pSubpSym, SymTable pLocalSymTable)
          subpDefifnition Make a subprogram definition node and set symRoot.subpCurrent = pSubpSym, set symRoot.symTableCurrentSubp = pLocalSymTable.
 SubpDefinition subpDefinition(Subp pSubpSym, SymTable pLocalSymTable, BlockStmt pInitiationPart, BlockStmt pHIRbody)
          subpDefinition with full specification.
 java.util.Iterator subpIterator()
          subpIterator Make an iterator that traverses all subprogram definitions in the current compile unit.
 SubpNode subpNode(Subp pSubp)
          subpNode Make a SubpNode instance having Subp symbol pSubp.
 SubscriptedExp subscriptedExp(Exp pArrayExp, Exp pSubscript)
          subscriptedExp Build a subscripted expression.
 Exp subscriptedExp(Exp pArrayExp, Exp pSubscript, Exp pElemSize)
          subscriptedExp Build an expression representing the indicated element of a vector whose element size is unfixed.
 SwitchStmt switchStmt(Exp pSelectExp, IrList pJumpList, Label pDefaultLabel, Stmt pSwitchBody, Label pEndLabel)
          switchStmt Make a SwitchStmt instance.
 SymNode symNode(Sym pSym)
          symNode Make a SymNode instance having pSym as attached symbol.
 java.lang.String toString()
          toString Get text representation of this node without traversing children.
 java.lang.String toStringDetail()
          toStringDetail Get text string of this node showing detail information.
 java.lang.String toStringShort()
          toStringShort Get text string of this node showing node name and index only.
 java.lang.String toStringWithChildren()
          toStringWithChildren Get the string of this node and its children traversing the children in depth-first order.
 ConstNode trueNode()
          trueNode Make a ConstNode instance having boolean true value.
 TypeNode typeNode(Type pType)
           
 Exp undecayExp(Exp pPointerExp, ConstNode pElemCount)
          undecayExp Build an expression that undecay a pointer to a vector whose element type is pointed type.
 Exp undecayExp(Exp pPointerExp, Exp pElemCount, Exp pLowerBound)
          undecayExp Build an expression that undecay a pointer to a vector whose element type is pointed type.
 Exp undecayExp(Exp pPointerExp, long pElemCount)
          undecayExp Build an expression that undecay a pointer to a vector whose element type is pointed type.
 Exp undecayExp(Exp pPointerExp, long pElemCount, long pLowerBound)
          undecayExp Build an expression that undecay a pointer to a vector whose element type is pointed type.
 VarNode varNode(Var pVar)
          varNode Make a VarNode instance having Var symbol pVar.
 void warinig(int pId, java.lang.String pMessage)
           
 WhileStmt whileStmt(Exp pCondition, Stmt pLoopBody)
           
 WhileStmt whileStmt(Label pLoopBackLabel, Exp pCondition, Stmt pLoopBody, Label pLoopStepLabel, Label pLoopEndLabel)
          ifStmt Build an if-statement with then-part (pThenPart) and else-part (pElsePart).
 boolean withInf()
           
 
クラス java.lang.Object から継承したメソッド
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

hirRoot

public final HirRoot hirRoot

fOperator

protected int fOperator

fChildNode1

protected IR fChildNode1

fChildNode2

protected IR fChildNode2

fAdditionalChild

protected IR[] fAdditionalChild

fParentNode

protected IR fParentNode

fChildCount

protected int fChildCount

fHirAnnex

protected HirAnnex fHirAnnex

fType

protected Type fType

fDbgLevel

protected final int fDbgLevel

machineParam

protected static MachineParam machineParam

sourceLanguage

protected static SourceLanguage sourceLanguage

inversionTable

static final int[] inversionTable
コンストラクタの詳細

HIR_Impl

public HIR_Impl()
Default constructor


HIR_Impl

public HIR_Impl(HirRoot pHirRoot)
Constructor to set hirRoot


HIR_Impl

protected HIR_Impl(HirRoot pHirRoot,
                   int pOperator)
Usually, HIR constructor should be given operation code.

メソッドの詳細

setParameters

public void setParameters(MachineParam pMachineParam,
                          SourceLanguage pSourceLanguage)

getOperator

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

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

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.

setParent

public void setParent(IR pParent)
インタフェース HIR の記述:
setParent Set the parent of this node as pParent. This method should be used carefully so that consistency is kept. It is not recommended to use this method except in the methods built-in in coins/ir, coins/ir/hir, coins/ir/lir. Almost all HIR nodes has parent but some LIR node has no parent in which case, setParent will have no effect. (LIRTreeList, LIRTree have no parent.)

定義:
インタフェース HIR 内の setParent
パラメータ:
pParent - node to be set as parent of this node.

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.

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.

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.

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.

setChild1

public void setChild1(IR pChild)
定義:
インタフェース HIR 内の setChild1

setChild2

public void setChild2(IR pChild)
定義:
インタフェース HIR 内の setChild2

setChild

public void setChild(int pNumber,
                     IR pHir)
setChild Set pHir as pNumber-th child of this node.

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

getChildNumber

public int getChildNumber()
インタフェース HIR0 の記述:
getChildNumber Get the child number of this node. If not found, return -1. (Usually, it is unnecessary to use this because the child number is known by stack, etc.)

定義:
インタフェース HIR0 内の getChildNumber

addInf

public void addInf(java.lang.String pInfKindInterned,
                   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.

getInf

public java.lang.Object getInf(java.lang.String pInfKindInterned)
インタフェース 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 pInfKindInterned)
インタフェース IR の記述:
removeInf Remove the information of the kind pInfKindInterned. If there is no information of the specified kind, then no effect remains.

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

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

copyInfListFrom

public void copyInfListFrom(HIR pFromHir)
インタフェース HIR の記述:
Copy the contents of InfList attached to pFromHir to the InfList of this node. If this node has Inf of the same kind as that of pFromHir, then it is replaced by that of pFromHir. If this node has Inf that is not included in pFromHir, then the Inf remains unchanged. If pFromHir has no Inf, then do nothing.

定義:
インタフェース HIR 内の copyInfListFrom
パラメータ:
pFromHir - HIR node that may have InfList.

getInfString

public java.lang.String getInfString()
インタフェース HIR の記述:
Get the string image of Inf. If there is no Inf, return "".

定義:
インタフェース HIR 内の getInfString
戻り値:
the string image of Inf.

withInf

public boolean withInf()

getWork

public java.lang.Object getWork()
インタフェース HIR の記述:
getWork Get information set by setWork for this node. Users should cast by the name of the class used in setWork.

定義:
インタフェース HIR 内の getWork
戻り値:
the information object set by setWork. This method is moved to IR interface.

setWork

public void setWork(java.lang.Object pWork)
インタフェース HIR の記述:
setWork Set information privately used in each phase.

定義:
インタフェース HIR 内の setWork
パラメータ:
pWork - any information of arbitrary class to be set to this node; You may define a new class that represents arbitrary information and give its reference as pWork. This method is moved to IR interface.

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.

setIndex

public void setIndex(int pIndex)
インタフェース HIR の記述:
setIndex Set an index number to "this" node. (The index number is used to refer the node in data flow analysis.)

定義:
インタフェース HIR 内の setIndex
パラメータ:
pIndex - the index number to be assigned to "this" node.

isStmt

public boolean isStmt()
インタフェース HIR の記述:
isStmt

定義:
インタフェース HIR 内の isStmt
戻り値:
true if this node is a statement node, otherwise return false.

getStmtContainingThisNode

public Stmt getStmtContainingThisNode()
インタフェース HIR0 の記述:
getStmtContainingThisNode Get the innermost statement or LabeledStmt containing this node by traversing ancestors of this node. If this is a statement, then this is the innermost statement. If the the parent of the innermost statement is a LabeledStmt, then the LabeledStmt is returned else the innermost statement is returned.

定義:
インタフェース HIR0 内の getStmtContainingThisNode
戻り値:
the innermost statement or LabeledStmt containing this node.

getExpId

public ExpId getExpId()
インタフェース HIR の記述:
getExpId Get the expression identifier assigned to this node.

定義:
インタフェース HIR 内の getExpId
戻り値:
the expression identifier assigned to this node, or return null if it is not assigned.

getSymOrExpId

public FlowAnalSym getSymOrExpId()
インタフェース HIR の記述:
getSymOrExpId If this is a SymNode with FlowAnalSym instance, then return it else return getExpId().

定義:
インタフェース HIR 内の getSymOrExpId
戻り値:
FlowAnalSym or ExpId attached to this node.

getFlowAnalSym

public FlowAnalSym getFlowAnalSym()
インタフェース HIR の記述:
getFlowAnalSym Get the flow analysis symbol assigned to this node if it is given. FlowAnalSym is either Var, Reg, or ExpId. (See coins.sym.FlowAnalSym.)

定義:
インタフェース HIR 内の getFlowAnalSym
戻り値:
the flow analysis symbol assigned to this node, or return null if it is not assigned.

getSourceNode1

public HIR getSourceNode1()
インタフェース HIR の記述:
getSourceNode1 Get the 1st source operand node of "this" node where the source is an operand used/refered in "this" operation. See getSourceNode1 of HIR interface and LIR interface.

定義:
インタフェース HIR 内の getSourceNode1
戻り値:
1st source operand of "this" node, return null if "this" has no source operand 1. If "this" is HIR node, its child 1 is returned. If "this" is LIR node, the node computing its operand 1 is returned; If there is no such node, null is returned.

getSourceNode2

public HIR getSourceNode2()
インタフェース HIR の記述:
getSourceNode2 Get the 2nd source operand node of "this" node. Other matters and conditions are just like those of getSourceNode1.

定義:
インタフェース HIR 内の getSourceNode2
戻り値:
2nd source operand of "this" node. return null if "this" has no 2nd source operand.

getSourceNode

public HIR getSourceNode(int pNumber)
インタフェース HIR の記述:
getSourceNode Get the pNumber-th source operand of "this" node. Other matters and conditions are just like those of getSourceNode1.

定義:
インタフェース HIR 内の getSourceNode
パラメータ:
pNumber - 1: source 1, 2: source 2, 3: source 3, ... .
戻り値:
the pNumber-th source operand of "this" node, return null if "this" has no pNumber-th source operand.

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.)

getResultOperand

public Sym getResultOperand()

getResultVar

public Sym getResultVar()

replaceSource1

public HIR replaceSource1(HIR pOperand)
インタフェース HIR の記述:
replaceSource1 Replace the source operand 1 of "this" node by pOperand. "this" should be a node that can have source operand 1, that is, nonleaf node if "this" is HIR node, etc.

定義:
インタフェース HIR 内の replaceSource1
パラメータ:
pOperand - node that take place of source operand 1.

replaceSource2

public HIR replaceSource2(HIR pOperand)
インタフェース HIR の記述:
replaceSource2 Replace the source operand 2 of "this" node by pOperand. Other matters and conditions are just like those of replaceSource1. "this" should be a node that can have source operand 2.

定義:
インタフェース HIR 内の replaceSource2
パラメータ:
pOperand - node that take place of source operand 2.

replaceSource

public HIR replaceSource(int pNumber,
                         IR pOperand)
インタフェース HIR の記述:
replaceSource Replace pNumber-th source operand of "this" node by pOperand. Other matters and conditions are just like those of replaceSource1. "this" should be a node that can have source operand, that is, nonleaf node if "this" is HIR node, etc.

定義:
インタフェース HIR 内の replaceSource
パラメータ:
pNumber - 1: source 1, 2: source 2, 3: source 3, ... .
pOperand - node that take place of source operand.

replaceResultOperand

public void replaceResultOperand(HIR pOperand)

replaceResultVar

public void replaceResultVar(HIR pOperand)

replaceThisNode

public HIR replaceThisNode(HIR pNewNode)
インタフェース HIR0 の記述:
replaceThisNode Replace "this" node by pNewNode. If this has parent, then the link between this and the parent is changed to the link between pNewNode and the parent. "this" may be any node that makes sense by replacement.

定義:
インタフェース HIR0 内の replaceThisNode
パラメータ:
pNewNode - node that takes place of "this" node.

replaceOperator

public void replaceOperator(int pOperator)

cutParentLink

public void cutParentLink()
インタフェース HIR の記述:
cutParentLink Cut both links from/to parent node if they exist. (Used to prepare for moving a node.) This method is prepared for factory methods and it is not recommended to use this method except when user knows the structure of HIR in detail.

定義:
インタフェース HIR 内の cutParentLink

cutParentLink

public void cutParentLink(int pChildNumber)

isSym

public boolean isSym()
インタフェース HasStringObject の記述:
Test if this is a Sym object.

定義:
インタフェース HasStringObject 内の isSym
戻り値:
true if this is a Sym object, false otherwise.

isHIR

public boolean isHIR()
インタフェース HasStringObject の記述:
Test if this is an HIR object.

定義:
インタフェース HasStringObject 内の isHIR
戻り値:
true if this is an HIR object, false otherwise.

isLIR

public boolean isLIR()

isEmpty

public boolean isEmpty(HIR pHir)
インタフェース HIR の記述:
isEmpty Decide if pHir is empty or not, where empty means either null, NullNode, HIR with OP_NULL as its operator, LabeledStmt whose statement body isEmpty, or ExpStmt whose Exp part isEmpty.

定義:
インタフェース HIR 内の isEmpty
パラメータ:
pHir - HIR node to be tested if empty or not.
戻り値:
true if pHir is empty else retuen false.

isTerminal

public boolean isTerminal()

contains

public boolean contains(HIR pSubtree)
インタフェース HIR の記述:
Check if pSubtree is contained in this subtree. It is not recommended to apply this method to large subtree but recommended to apply to small subtree such as expressions.

定義:
インタフェース HIR 内の contains
パラメータ:
pSubtree - subtree to be searched.
戻り値:
true if found, false if not found.

toString

public java.lang.String toString()
インタフェース HIR の記述:
toString Get text representation of this node without traversing children.

定義:
インタフェース HIR 内の toString
オーバーライド:
クラス java.lang.Object 内の toString
戻り値:
the text string representing the node including operation name, type, node index, and symbol name if this represents a symbol or constant.

toStringShort

public java.lang.String toStringShort()
インタフェース HIR の記述:
toStringShort Get text string of this node showing node name and index only.

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

toStringDetail

public java.lang.String toStringDetail()
インタフェース HIR の記述:
toStringDetail Get text string of this node showing detail information.

定義:
インタフェース HIR 内の toStringDetail

toStringWithChildren

public java.lang.String toStringWithChildren()
インタフェース HIR の記述:
toStringWithChildren Get the string of this node and its children traversing the children in depth-first order. The result is shown in compact form.

定義:
インタフェース HIR 内の toStringWithChildren
戻り値:
the string of this node and its children.

getIrName

public java.lang.String getIrName()
インタフェース HIR の記述:
getIrName Get operation name and node index to display node in compact form for flow analysis, debug, etc.

定義:
インタフェース HIR 内の getIrName

print

public void print(int pIndent)
インタフェース HasStringObject の記述:
Print the object.

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

print

public void print(int pIndent,
                  boolean pDetail)
インタフェース HasStringObject の記述:
Print the object.

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

getIndentSpace

public java.lang.String getIndentSpace(int pIndent)
インタフェース HIR の記述:
getIndentSace Get a sequence of spaces specified by pIndent.

定義:
インタフェース HIR 内の getIndentSpace
パラメータ:
pIndent - number of spaces to be generated.
戻り値:
a string of spaces.

setIndexNumberToAllNodes

public int setIndexNumberToAllNodes(int pStartNumber)
インタフェース HIR0 の記述:
setIndexNumberToAllNodes Set sequencial index number to all nodes traversing the subtree rooted by this node in depth-first order. The index number of this node is set to pStartNumber. If this node is an instance of SubpDefinition, then the minimum and the maximum of the index numberes set to the nodes of this subtree are recorded in SubpDefinition instance so that they can be accessed by getNodeIndexMin() and getNodeIndexMax() of SubpDefinition.

定義:
インタフェース HIR0 内の setIndexNumberToAllNodes
パラメータ:
pStartNumber - starting value of the index (greater than 0).
戻り値:
(the last index number) + 1.

setIndexNumberToAllNodes

public int setIndexNumberToAllNodes(int pStartNumber,
                                    boolean pResetSymIndex)
インタフェース HIR の記述:
Set index number to all nodes and if pResetSymIndex is true, reset Sym index by resetFlowAnalInf for FlowAnalSym nodes.

定義:
インタフェース HIR 内の setIndexNumberToAllNodes
パラメータ:
pStartNumber -
pResetSymIndex - true if resetFlowAnalInf is to be done.
戻り値:
the largest index number set to nodes.

setIndexNumberToAllNodes2

public int setIndexNumberToAllNodes2(int pStartNumber,
                                     boolean pResetSymIndex)

finishHir

public boolean finishHir()
インタフェース HIR0 の記述:
 finishHir does closing operations for HIR.
 finishHir should be called for Program or SubpDefinition
 when HIR building or restructuring were completed in such
 timing as
   at the end of new HIR generation in front-end
    (call for hirRoot.programRoot),
   at the end of restructuring (optimization, parallelization, etc.)
    (call for corresponding SubpDefinition subtree).
 If finishHir is scheduled to be called for programRoot after successive
 generation or restructuring of SubpDefinitions before passing it to other
 phases, then it is unnecessary to call it for each SubpDefinition.
 finishHir set index number to all nodes of this subtree
 and verifies its tree structure.
 It also certificates the value of getHirPosition() for labels  //##60
 and buildLabelRefList is called for SubpDefinition
 (for Program, buildLabelRefList is called for every SubpDefinitions). //##62
 If finishHir is called then it is not necessary to call
 setIndexNumberToAllNnodes() nor isTree().
 If error is found, then finishHir() returns false after isuing
 error message. If no error is found then it returns true.
 In either case, processing will continue.

定義:
インタフェース HIR0 内の finishHir
戻り値:
true if descrepancy is not found, false if descrepancy is found.

warinig

public void warinig(int pId,
                    java.lang.String pMessage)

slightError

public void slightError(int pId,
                        java.lang.String pMessage)

severeError

public void severeError(int pId,
                        java.lang.String pMessage)

fatalError

public void fatalError(int pId,
                       java.lang.String pMessage)

program

public Program program(Sym pProgSym,
                       SymTable pGlobalSymTable,
                       IR pInitiationPart,
                       IrList pSubpList)
インタフェース HIR0 の記述:
program Make a program node. See Program interface.

定義:
インタフェース HIR0 内の program
パラメータ:
pProgSym - Program name (may be null).
pGlobalSymTable - Symbol table for global symbols.
pInitiationPart - Initiation statement (may be null).
pSubpList - List of subprograms; At first, it may be an empty list; (See addSubpDefinition of Program interface).

subpDefinition

public SubpDefinition subpDefinition(Subp pSubpSym,
                                     SymTable pLocalSymTable)
インタフェース HIR0 の記述:
subpDefifnition Make a subprogram definition node and set symRoot.subpCurrent = pSubpSym, set symRoot.symTableCurrentSubp = pLocalSymTable. You may add initiation-part, HIR-body later by using addInitiationStmt, setHirBody of SubpDefinition interface. Start label and end label for the given subprogram are generated to make getStartLabel(), getEndLabel() of Subp interface effective.

定義:
インタフェース HIR0 内の subpDefinition
パラメータ:
pSubpSym - Subprogram symbol. Should be given.
pLocalSymTable - Symbol table local in the subprogram; If subprogram uses a local symbol table, this parameter should be given (by using pushSymTable() of SymTable interface); If the source language permits no local symbol for subprogram, this parameter may be null.
戻り値:
the created SubpDefinition instance.

subpDefinition

public SubpDefinition subpDefinition(Subp pSubpSym)

subpDefinition

public SubpDefinition subpDefinition(Subp pSubpSym,
                                     SymTable pLocalSymTable,
                                     BlockStmt pInitiationPart,
                                     BlockStmt pHIRbody)
インタフェース HIR の記述:
subpDefinition with full specification. Other items are the same as the previous method.

定義:
インタフェース HIR 内の subpDefinition
パラメータ:
pSubpSym - Subprogram symbol. Should be given.
pLocalSymTable - Symbol table local in the subprogram; If subprogram uses a local symbol table, this parameter should be given (by using pushSymTable() of SymTable interface); Even if the source program does not use local symbol, this parameter is required to register temporal variables and internal labels generated by the compiler. //##51
pInitiationPart - Initiation statement block. optional.
pHIRbody - Subprogram body in HIR. optional.

irList

public IrList irList(java.util.LinkedList pList)
インタフェース HIR の記述:
irList Make an HirList node that makes a LinkedList. The created list can be treated as an HIR node.

定義:
インタフェース HIR 内の irList
パラメータ:
pList - List of objects to be included in the HirList; The elements of the list are an HIR object or Sym object.
戻り値:
IrList containing pList; Resultant list is also an instance of HIR.

irList

public IrList irList()
インタフェース HIR0 の記述:
irList Make an empty HirList node that make a LinkedList. Use methods of IrList to add elements to the list. The elements to be added are an HIR object or Sym object. The created list can be treated as an HIR node.

定義:
インタフェース HIR0 内の irList
戻り値:
an empty IrList; Resultant list is also an instance of HIR.

hirList

public HirList hirList()
定義:
インタフェース HIR0 内の hirList

infStmt

public InfStmt infStmt(java.lang.String pInfKind,
                       IrList pInfData)
インタフェース HIR の記述:
infStmt Build an InfStmt representing some information. The information may be defined in each compiler for arbitrary purpose.

定義:
インタフェース HIR 内の infStmt
パラメータ:
pInfKind -
pInfData -
戻り値:
the InfNode created. ***deprecated InfNode was deleted. Use infStmt method.

infStmt

public InfStmt infStmt(java.lang.String pInfKind,
                       java.lang.Object pInfData)
定義:
インタフェース HIR 内の infStmt

varNode

public VarNode varNode(Var pVar)
インタフェース HIR0 の記述:
varNode Make a VarNode instance having Var symbol pVar.

定義:
インタフェース HIR0 内の varNode
パラメータ:
pVar - Variable symbol to be attached to the node.
戻り値:
the resultant VarNode.

elemNode

public ElemNode elemNode(Elem pElem)
インタフェース HIR0 の記述:
elemNode Make an ElemNode instance having Elem symbol pElem.

定義:
インタフェース HIR0 内の elemNode
パラメータ:
pElem - Struct/union element symbol to be attached to the node.
戻り値:
the resultant ElemNode.

subpNode

public SubpNode subpNode(Subp pSubp)
インタフェース HIR0 の記述:
subpNode Make a SubpNode instance having Subp symbol pSubp.

定義:
インタフェース HIR0 内の subpNode
パラメータ:
pSubp - Subprogram symbol to be attached to the node.
戻り値:
the resultant SubpNode.

typeNode

public TypeNode typeNode(Type pType)

labelNode

public LabelNode labelNode(Label pLabel)
インタフェース HIR0 の記述:
labelNode Make a LabelNode instance having Label symbol pLabel. (See labelDef.)

定義:
インタフェース HIR0 内の labelNode
パラメータ:
pLabel - Label symbol to be attached to the node.
戻り値:
the resultant LabelNode.

constNode

public ConstNode constNode(Const pConst)
インタフェース HIR0 の記述:
constNode Make a ConstNode instance having constant symbol pConst.

定義:
インタフェース HIR0 内の constNode
パラメータ:
pConst - Constant symbol to be attached to the node.
戻り値:
the resultant ConstNode.

intConstNode

public ConstNode intConstNode(int pIntValue)
インタフェース HIR の記述:
intConstNode Make a ConstNode instance having pIntValue as its value. The constant value is changed to Const symbol and attached to the constant node.

定義:
インタフェース HIR 内の intConstNode
パラメータ:
pIntValue - Integer value to be attached to the node.
戻り値:
the resultant ConstNode.

intConstNode

public ConstNode intConstNode(long pIntValue)
インタフェース HIR0 の記述:
intConstNode Make a ConstNode instance having pIntValue as its value. The constant value is changed to Const symbol and attached to the constant node.

定義:
インタフェース HIR0 内の intConstNode
パラメータ:
pIntValue - Integer value to be attached to the node.
戻り値:
the resultant ConstNode.

offsetConstNode

public ConstNode offsetConstNode(long pIntValue)
インタフェース HIR の記述:
offsetConstNode Make a ConstNode instance having pIntValue as its offset value. The offset value pIntValue is changed to Const symbol and attached to the constant node.

定義:
インタフェース HIR 内の offsetConstNode
パラメータ:
pIntValue - Offset value to be attached to the node.
戻り値:
the resultant ConstNode.

trueNode

public ConstNode trueNode()
インタフェース HIR0 の記述:
trueNode Make a ConstNode instance having boolean true value.

定義:
インタフェース HIR0 内の trueNode
戻り値:
the true ConstNode.

falseNode

public ConstNode falseNode()
インタフェース HIR0 の記述:
falseNode Make a ConstNode instance having boolean false value.

定義:
インタフェース HIR0 内の falseNode
戻り値:
the false ConstNode.

symNode

public SymNode symNode(Sym pSym)
インタフェース HIR0 の記述:
symNode Make a SymNode instance having pSym as attached symbol. This method is used for symbols other than Var, Elem, Subp, Label, and constant.

定義:
インタフェース HIR0 内の symNode
パラメータ:
pSym - Symbol to be attached to the node.
戻り値:
the resultant SymNode.

nullNode

public NullNode nullNode()
インタフェース HIR の記述:
nullNode Make a NullNode instance.

定義:
インタフェース HIR 内の nullNode
戻り値:
the NullNode.

labelDef

public LabelDef labelDef(Label pLabel)
インタフェース HIR0 の記述:
labelDef Make a LabelDef instance that defines the label pLabel. (See labelNode.)

定義:
インタフェース HIR0 内の labelDef
パラメータ:
pLabel - Label symbol to be defined.
戻り値:
the resultant LabelDef.

exp

public Exp exp(int pOperator,
               Exp pExp1)
インタフェース HIR0 の記述:
exp
  Build unary expression according to the
  operator given:
  OP_NOT      // bitwise not (~) one's complement
              // logical not for bool (!)
  OP_NEG      // negate (unary minus)
  OP_ADDR     // get address (&)
  OP_CONTENTS // get contents of pointed memory
  OP_CONV     // type conversion for basic type
  OP_DECAY    // convert array to pointer
  OP_SIZEOF   // sizeof operator
  OP_ENCLOSE  // honor parenthesis
  The type of resultant expression is set according to the rule
  described in the HIR specifications, however, it may be necessary
  to do language-wise treatment. In such case, front-end part of the
  language should set type after creating the instance of Exp.
  (In C, expressions related to pointer and vector are specially
   treated in C front end ToHirC.)

 

定義:
インタフェース HIR0 内の exp
パラメータ:
pOperator - unary operator such as OP_NOT, OP_NEG, OP_ADDR, OP_CONTENTS, OP_CONV, OP_DECAY, OP_SIZEOF, OP_ENCLOSE defined in HIR interface.
pExp1 - operand expression.
戻り値:
the resultant unary expression subtree.

exp

public Exp exp(int pOperator,
               Exp pExp1,
               Exp pExp2)
インタフェース HIR0 の記述:
exp Build binary expression. The type of resultant expression is set according to the rule described in the HIR specifications, however, it may be necessary to do language-wise treatment. In such case, front-end part of the language should set type after creating the instance of Exp. (In C, expressions related to pointer and vector are specially treated in C front end ToHirC.)

定義:
インタフェース HIR0 内の exp
パラメータ:
pOperator - binary operator such as OP_ADD, OP_MULT, etc. defined in HIR interface.
pExp1 - operand 1 expression.
pExp2 - operand 2 expression.
戻り値:
the resultant binary expression subtree.

exp

public Exp exp(int pOperator,
               Exp pExp1,
               Exp pExp2,
               Exp pExp3)
インタフェース HIR の記述:
exp: Build ternary expression (OP_SELECT, etc.).

定義:
インタフェース HIR 内の exp
パラメータ:
pExp1 - operand 1 expression.
pExp2 - operand 2 expression.
pExp3 - operand 3 expression.
戻り値:
the resultant ternary expression subtree.

decayExp

public Exp decayExp(Exp pExp)
インタフェース HIR0 の記述:
decayExp Build an expression that decay a vector to a pointer to vector element, or decay a String into a pointer to Char element.

定義:
インタフェース HIR0 内の decayExp
パラメータ:
pExp - vector variable or string constant.
戻り値:
decay expression with pointer type.

undecayExp

public Exp undecayExp(Exp pPointerExp,
                      ConstNode pElemCount)
インタフェース HIR の記述:
undecayExp Build an expression that undecay a pointer to a vector whose element type is pointed type.

定義:
インタフェース HIR 内の undecayExp
パラメータ:
pPointerExp - pointer expression pointing to the first element of the resultant vector.
pElemCount - Constant expression showing element count of the resultant vector.
戻り値:
the vector expression.

undecayExp

public Exp undecayExp(Exp pPointerExp,
                      Exp pElemCount,
                      Exp pLowerBound)
インタフェース HIR の記述:
undecayExp Build an expression that undecay a pointer to a vector whose element type is pointed type.

定義:
インタフェース HIR 内の undecayExp
パラメータ:
pPointerExp - pointer expression pointing to the first element of the resultant vector.
pElemCount - Expression showing element count of the resultant vector.
pLowerBound - Expression showing the lower index bound of the resultant vector.
戻り値:
the vector expression.

undecayExp

public Exp undecayExp(Exp pPointerExp,
                      long pElemCount)
インタフェース HIR の記述:
undecayExp Build an expression that undecay a pointer to a vector whose element type is pointed type.

定義:
インタフェース HIR 内の undecayExp
パラメータ:
pPointerExp - pointer expression pointing to the first element of the resultant vector.
pElemCount - element count of the resultant vector.
戻り値:
the vector expression.

undecayExp

public Exp undecayExp(Exp pPointerExp,
                      long pElemCount,
                      long pLowerBound)
インタフェース HIR0 の記述:
undecayExp Build an expression that undecay a pointer to a vector whose element type is pointed type.

定義:
インタフェース HIR0 内の undecayExp
パラメータ:
pPointerExp - pointer expression pointing to the first element of the resultant vector.
pElemCount - element count of the resultant vector.
pLowerBound - lower index bound of the resultant vector.
戻り値:
the vector expression.

subscriptedExp

public SubscriptedExp subscriptedExp(Exp pArrayExp,
                                     Exp pSubscript)
インタフェース HIR0 の記述:
subscriptedExp Build a subscripted expression.

定義:
インタフェース HIR0 内の subscriptedExp
パラメータ:
pArrayExp - array expression to which subscript is to be attached; If multi-dimensional subscript is required, make pArrayExp as a subscripted variable and add more subscript by this method.
pSubscript - subscript expression.
戻り値:
subscripted expression node having operation code subsCode.

subscriptedExp

public Exp subscriptedExp(Exp pArrayExp,
                          Exp pSubscript,
                          Exp pElemSize)
インタフェース HIR の記述:
subscriptedExp Build an expression representing the indicated element of a vector whose element size is unfixed. If the size of the vector element is fixed and pElemSize is equal to it, then (subs pArrayExp pSubscript) is returned. If not, then a pointer expression representing the element located at the address addr(pArrayExp) + pElemSize * (pSubscript - lowerBound) is returned. As for vectors whose element size is constant or represented by an expression, use subscriptedExp( Exp pArrayExp, Exp pSubscript ) instead of this method.

定義:
インタフェース HIR 内の subscriptedExp
パラメータ:
pArrayExp - is array expression to which subscript is to be attached (it is unfixed size vector).
pSubscript - is subscript expression.
pElemSize - is the element size of pArrayExp in bytes.
戻り値:
either subscripted expression node having operation code subsCode or pointer expression if the element type is unfixed-size.

qualifiedExp

public QualifiedExp qualifiedExp(Exp pStructUnionExp,
                                 ElemNode pElemNode)
インタフェース HIR0 の記述:
qualifiedExp Build a qualified expression.

定義:
インタフェース HIR0 内の qualifiedExp
パラメータ:
pStructUnionExp - expression specifying structure or union or region_variable to qualify.
pElemNode - An element of pStructUnionExp.
戻り値:
qualified expression node having operation code qualCode.

pointedExp

public PointedExp pointedExp(Exp pStructUnionExp,
                             ElemNode pElemNode)
インタフェース HIR0 の記述:
pointedExp Build a pointed expression.

定義:
インタフェース HIR0 内の pointedExp
パラメータ:
pStructUnionExp - expression specifying structure or union whose element is to be pointed.
pElemNode - An element of pStructUnionExp.
戻り値:
pointed expression node having operation code arrowCode.

contentsExp

public Exp contentsExp(Exp pPointerExp)
インタフェース HIR0 の記述:
contentsExp Build an expression that gets the contents pointed by pPointerExp.

定義:
インタフェース HIR0 内の contentsExp
パラメータ:
pPointerExp - Expression representing a pointer.
戻り値:
the expression that gets the pointed expression.

convExp

public Exp convExp(Type pType,
                   Exp pExp)
インタフェース HIR0 の記述:
convExp Build an expression to convert the type of pExp to pType.

定義:
インタフェース HIR0 内の convExp
パラメータ:
pType - Type to which pExp is to be changed.
pExp - Expression to be converted.
戻り値:
the expression converted to pType.

sizeofExp

public Exp sizeofExp(Type pType)
インタフェース HIR0 の記述:
sizeofExp Build the expression that get the size of pType.

定義:
インタフェース HIR0 内の sizeofExp
パラメータ:
pType - Type of object.
戻り値:
the expression representing the size of pType.

sizeofExp

public Exp sizeofExp(Exp pExp)
インタフェース HIR0 の記述:
sizeofExp Build the expression that get the size of pExp.

定義:
インタフェース HIR0 内の sizeofExp
パラメータ:
pExp - Expression whose size is to be taken.
戻り値:
the expression representing the size of pExp.

functionExp

public FunctionExp functionExp(Exp pFunctionSpec,
                               IrList pActualParamList)
インタフェース HIR0 の記述:
functionExp Build a function expression node that computes function value. The function may have no return value (void return value). If pFunctionSpec is (addr SubpNode) or SubpNode, then the subprogram represented by it is added to the call list of the current subprogram (symRoot.subpCurrent). The type of resultant expression is usually the type of return value, but type of pointed expression if pFunctionSpec is a pointer (to subprogram).

定義:
インタフェース HIR0 内の functionExp
パラメータ:
pFunctionSpec - function specification part which may be either a function name (SubpNode), or an expression specifying a function name ((addr SubpNode), etc.).
pActualParamList - actual parameter list (made by hirList).
戻り値:
function expression node having operation code opCall.

addrExp

public Exp addrExp(Exp pExp)
インタフェース HIR の記述:
addrExp Build addr expression representing the address of pExp. pExp should be l-value expression such as variable or SubpNode expression.

定義:
インタフェース HIR 内の addrExp
パラメータ:
pExp - l-value expression or SubpNode.
戻り値:
the addr expression.

conditionalExp1

public Exp conditionalExp1(Exp pExp)

conditionalExp

public Exp conditionalExp(Exp pExp)
インタフェース HIR の記述:
conditionalExp builds boolean expression to be used as conditional expression of IfStmt and LoopStmt. This will transform pExp to comparison expression if it is not so that conversion to LIR become easy.

定義:
インタフェース HIR 内の conditionalExp
パラメータ:
pExp - boolean expression.
戻り値:
pExp if pExp is a comparison expression or return comparison expression transformed from pExp.

callStmt

public ExpStmt callStmt(Exp pSubpSpec,
                        IrList pActualParamList)
インタフェース HIR0 の記述:
callStmt Build a subprogram call statement. Parameters are the same as those of functionExp.

定義:
インタフェース HIR0 内の callStmt
パラメータ:
pSubpSpec - subprogram specification part which may be either a subprogram name (SubpNode), or an expression specifying a subprogram name ((addr SubpNode), etc.).
pActualParamList - actual parameter list (made by hirList).
戻り値:
function expression node having operation code opCall.

assignStmt

public AssignStmt assignStmt(Exp pLeft,
                             Exp pRight)
インタフェース HIR0 の記述:
assignStmt Build an assignemnt statement.

定義:
インタフェース HIR0 内の assignStmt
パラメータ:
pLeft - left hand side (l-value) expression to which the value of expression is to be assigned.
pRight - expression (subtree) that is to be assigned to pLeftSide.
戻り値:
the subtree of the built statement with statement body operator assignCode.

ifStmt

public IfStmt ifStmt(Exp pCondition,
                     Stmt pThenPart,
                     Stmt pElsePart)
インタフェース HIR0 の記述:
ifStmt Build an if-statement with then-part (pThenPart) and else-part (pElsePart). Internal labels (then-label and else-label) are generated to be attached to the then-part and else-part. If pThenPart or pElsePart is null, a LabeledStmt with null statement body is generated as then-part or else-part.

定義:
インタフェース HIR0 内の ifStmt
パラメータ:
pCondition - conditional expression subtree.
pThenPart - then-part statement that is executed when pCondition is true.
pElsePart - else-part statement that is executed when pCondition is false.
戻り値:
the subtree of the built statement with statement body operator OP_IF; If else-part is not given, it is treated as null.

whileStmt

public WhileStmt whileStmt(Exp pCondition,
                           Stmt pLoopBody)
定義:
インタフェース HIR0 内の whileStmt

whileStmt

public WhileStmt whileStmt(Label pLoopBackLabel,
                           Exp pCondition,
                           Stmt pLoopBody,
                           Label pLoopStepLabel,
                           Label pLoopEndLabel)
インタフェース HIR の記述:
ifStmt Build an if-statement with then-part (pThenPart) and else-part (pElsePart). Internal labels (then-label and else-label) are generated to be attached to the then-part and else-part. If pThenPart or pElsePart is null, a LabeledStmt with null statement body is generated as then-part or else-part. (null else-part can be deleted by deleteUselessLabeledStmtOfHir() of coins.flow.DeleteUnusedLabels1.)

定義:
インタフェース HIR 内の whileStmt
パラメータ:
pCondition - conditional expression subtree.
戻り値:
the subtree of the built statement with statement body operator OP_IF; If else-part is not given, it is treated as null.

forStmt

public ForStmt forStmt(Stmt pInitStmt,
                       Exp pCondition,
                       Stmt pLoopBody,
                       Stmt pStepPart)
定義:
インタフェース HIR0 内の forStmt

forStmt

public ForStmt forStmt(Stmt pInitStmt,
                       Label pLoopBackLabel,
                       Exp pCondition,
                       Stmt pLoopBody,
                       Label pLoopStepLabel,
                       Stmt pStepPart,
                       Label pLoopEndLabel)
定義:
インタフェース HIR 内の forStmt

repeatStmt

public RepeatStmt repeatStmt(Stmt pLoopBody,
                             Exp pCondition)
定義:
インタフェース HIR0 内の repeatStmt

repeatStmt

public RepeatStmt repeatStmt(Label pLoopBackLabel,
                             Stmt pLoopBody,
                             Label pLoopStepLabel,
                             Exp pCondition,
                             Label pLoopEndLabel)
定義:
インタフェース HIR 内の repeatStmt

indexedLoopStmt

public IndexedLoopStmt indexedLoopStmt(Var pLoopIndex,
                                       Exp pStartValue,
                                       Exp pEndValue,
                                       Exp pStepValue,
                                       Stmt pStmtBody)
定義:
インタフェース HIR 内の indexedLoopStmt

indexedLoopStmt

public IndexedLoopStmt indexedLoopStmt(Var pLoopIndex,
                                       Exp pStartValue,
                                       Exp pEndValue,
                                       Exp pStepValue,
                                       boolean pUpward,
                                       Stmt pStmtBody)
定義:
インタフェース HIR 内の indexedLoopStmt

labeledStmt

public LabeledStmt labeledStmt(Label pLabel,
                               Stmt pStmt)
インタフェース HIR0 の記述:
labeledStmt Build labeled statement using pLabel as its label and pStmt as its statement body. It is recommended to use attachLabel of Stmt except in HIR access methods to make a labeled statement. If you want to use labeledStmt, give null as pStmt parameter. Relations between pStmt and others (such as previousStmt, nextStmt, parentNode) are not kept. If it is necessary to transfer such relations to this LabeledStmt, apply attachLabel method to pStmt instead of calling labeledStmt.

定義:
インタフェース HIR0 内の labeledStmt

blockStmt

public BlockStmt blockStmt(Stmt pStmtSequence)
インタフェース HIR0 の記述:
blockStmt Make an instance of block statement that may contain a sequence of statements. It is recommended to make an empty block statement by blockStmt(null) and then add statements by successively calling addLastStmt method of BlockStmt.

定義:
インタフェース HIR0 内の blockStmt
パラメータ:
pStmtSequence - statement to be included in BlockStmt (may be null).
戻り値:
the resultant BlockStmt.

returnStmt

public ReturnStmt returnStmt(Exp pReturnValue)
インタフェース HIR0 の記述:
returnStmt Build return statement that terminates the execution of current subprogram under construction.

定義:
インタフェース HIR0 内の returnStmt
パラメータ:
pReturnValue - return value of function subprogram. If the subprogram has no return value, it is null.
戻り値:
the subtree of the built statement with statement body operator OP_RETURN.

returnStmt

public ReturnStmt returnStmt()
インタフェース HIR の記述:
returnStmt Build return statement that terminates the execution of current subprogram under construction. It has no return value.

定義:
インタフェース HIR 内の returnStmt
戻り値:
the subtree of the built statement with statement body operator OP_RETURN.

jumpStmt

public JumpStmt jumpStmt(Label pLabelSym)
インタフェース HIR0 の記述:
jumpStmt Create a jump statement and increment reference count of pLabelSym.

定義:
インタフェース HIR0 内の jumpStmt
パラメータ:
pLabelSym - jump target label.
戻り値:
the created jump statement.

switchStmt

public SwitchStmt switchStmt(Exp pSelectExp,
                             IrList pJumpList,
                             Label pDefaultLabel,
                             Stmt pSwitchBody,
                             Label pEndLabel)
インタフェース HIR0 の記述:
switchStmt Make a SwitchStmt instance. The jump list pJumpList is a list of pairs of case constant and case label. Following sequence may create a jump list: created an empty list by irList() of HIR; generate a case-label and attach it to the statement corresponding to the case-constant; add hir.hirSeq(case-constant node, case-label node) to the list; repeat the generation of case-label and addition to the jump list;

定義:
インタフェース HIR0 内の switchStmt
パラメータ:
pSelectExp - Expression to select case statement.
pJumpList - Jump list that correlate case constant and case label.
pDefaultLabel - label to be attached to default statement part.
pSwitchBody - Switch statement body that contains statements with case-label.
pEndLabel - Label as the target of jump corresponding to break.
戻り値:
the resultant SwitchStmt.

expStmt

public ExpStmt expStmt(Exp pExp)
インタフェース HIR0 の記述:
expStmt Create a statement treating pExp as a statement. ExpStmt appears as loop-condition, call statement, etc. The loop-condition is an expression but it has label, and so, it should be ExpStmt. The call statement is a function call expression treated as a stand alone statement, and so, it should be ExpStmt. It also certificates the value of getHirPosition() for labels. //##60

定義:
インタフェース HIR0 内の expStmt
パラメータ:
pExp - expression to be treated as a statement.
戻り値:
the resultant ExpStmt.

nullStmt

public Stmt nullStmt()
インタフェース HIR の記述:
nullStmt Make a statement having NullNode as its statement body.

定義:
インタフェース HIR 内の nullStmt
戻り値:
the null statement.

phiExp

public PhiExp phiExp(Var pVar,
                     Label pLabel)
インタフェース HIR の記述:
phiExp Make a phi expression used in SSA.

定義:
インタフェース HIR 内の phiExp
パラメータ:
pVar - variable to be selected.
pLabel - label attached to a basic block from which control tranfers.
戻り値:
PhiExp.

hirSeq

public HirSeq hirSeq(HIR pChild1)
インタフェース HIR の記述:
hirSeq Make an HirSeq node that have some definite number of children.

定義:
インタフェース HIR 内の hirSeq
パラメータ:
pChild1 - Child 1 HIR node.
戻り値:
HirSeq with one child.

hirSeq

public HirSeq hirSeq(HIR pChild1,
                     HIR pChild2)
インタフェース HIR0 の記述:
hirSeq Make an HirSeq node that have some definite number of children. //##59 (See HIR interface for HirSeq with more than 2 children.)

定義:
インタフェース HIR0 内の hirSeq
パラメータ:
pChild1 - Child 1 HIR node.
pChild2 - Child 2 HIR node.
戻り値:
HirSeq with 2 children.

hirSeq

public HirSeq hirSeq(HIR pChild1,
                     HIR pChild2,
                     HIR pChild3)
インタフェース HIR の記述:
hirSeq Make an HirSeq node that have some definite number of children.

定義:
インタフェース HIR 内の hirSeq
パラメータ:
pChild1 - Child 1 HIR node.
pChild2 - Child 2 HIR node.
pChild3 - Child 3 HIR node.
戻り値:
HirSeq with 3 children.

setDataStmt

public SetDataStmt setDataStmt(Exp pVariable,
                               Exp pValueExp)
インタフェース HIR の記述:
setDataStmt Make the statement that sets initial value or a list of initial values (pValueExp) to a variable (pVariable). The value(s) may be set at loading time (ahead of execution time) depending on execution environment. pVariable is the name of a scalar variable, an array variable, or a structure variable. If pVariable is not a scalar variable, pValueExp may be a list expression generated by expListExp method or a repeat specification generated by expRepeat method. pVariable is an l-value expression that may be a qualified expression or an array element. The qualified expression may appear to set initial values to elements of RegionType variable. The array element may appear in HIR expressions corresponding to Fortran DATA statement. If pVariable is an instance of Var, then a copy of pValueExp is set as the initial value of pvariable in the symbol table. pValueExp or elements of pValueExp should be constant value. See get, getWithRepeat, set methods of ExpListExp.

定義:
インタフェース HIR 内の setDataStmt
パラメータ:
pVariable - Variable to which initial value is to be set.
pValueExp - Value or list of values to be set to pVariable.
戻り値:
the statement representing initail value setting.

expList

public Exp expList(java.util.List pList)
インタフェース HIR の記述:
expList Make an expression representing a list of expressions, that is, make an instance of ExpListExp. The resultant list can be treated as an instance of Exp. Its elements may be an expression made by expRepeat method.

定義:
インタフェース HIR 内の expList
パラメータ:
pList - list of expressions.
戻り値:
expression list.

expRepeat

public Exp expRepeat(Exp pValue,
                     Exp pCount)
インタフェース HIR の記述:
expRepeat Make an expression representing a list of expressions of the same value.

定義:
インタフェース HIR 内の expRepeat
パラメータ:
pValue - Expression representing a value to be repeated.
pCount - Specifies the number of repeat count.
戻り値:
repetition specification.

asmStmt

public AsmStmt asmStmt(java.lang.String pInstructions,
                       HirList pActualParamList)
インタフェース HIR の記述:
asmStmt Make a statement representing asm( formalParams, instructionList, actualParams ).

定義:
インタフェース HIR 内の asmStmt
パラメータ:
pInstructions - String representing formal parameters and sequence of instructions.
pActualParamList - List of variable nodes and arithmetic expressions representing actual parameters.
戻り値:
instance of AsmStmt.

setChildren

public void setChildren(IR p1,
                        IR p2)
定義:
インタフェース HIR 内の setChildren

setChildren

public void setChildren(IR p1,
                        IR p2,
                        IR p3)
定義:
インタフェース HIR 内の setChildren

setChildren

public void setChildren(IR p1,
                        IR p2,
                        IR p3,
                        IR p4)

setChildren

public void setChildren(IR p1,
                        IR p2,
                        IR p3,
                        IR p4,
                        IR p5)

getType

public Type getType()
インタフェース HIR0 の記述:
getType Get the type attached to this node. The type is usually attached when node is built by HIR factory methods such as exp.

定義:
インタフェース HIR0 内の getType
戻り値:
the type attached to this node.

setType

public void setType(Type pType)
インタフェース HIR の記述:
setType Attach a type to this node. When HIR node is created by HIR factory methods, its type is set in the factory methods so that it is unnecessary to call setType again.

定義:
インタフェース HIR 内の setType
パラメータ:
pType - type to be attached to this node; It should represent a proper type corresponding to the result of subtree represented by this node.

getNextStmt

public Stmt getNextStmt()
インタフェース HIR0 の記述:
getNextStmt Get statement next to this statement.

定義:
インタフェース HIR0 内の getNextStmt
戻り値:
the statement next to this statement if this is a statement; If this is not a statement, return null.

getNextNode

public HIR getNextNode()
getNextNode is not recommended to be used in traversing HIR subtree because it has high overhead. It is recommended to use next() of HirIterator. getNextNode is provided for the case where HirIterator can not be used (in such cases as modification of HIR takes place while traversing HIR or getting next node in ancestors). getNextNode returns the node next to this traversing HIR tree in depth first order. If this subtree has no next node, then ancestor node is searched. null nodes are skipped and if null is returned, it means there is no next node.

戻り値:
the node next to this node.

getNextNodeSeeingAncestor

protected HIR getNextNodeSeeingAncestor(HIR pHir)

getFlag

public boolean getFlag(int pFlagNumber)
getFlag returns the value (true/false) of the flag indicated by pFlagNumber. setFlag sets the flag of specified number.

定義:
インタフェース HIR0 内の getFlag
パラメータ:
pFlagNumber - flag identification number.
戻り値:
the value of the flag.

setFlag

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

定義:
インタフェース HIR0 内の setFlag
パラメータ:
pFlagNumber - flag identification number.
pYesNo - true or false to be set to the flag.

flagsAreAllFalse

public boolean flagsAreAllFalse()

getFlagBox

public FlagBox getFlagBox()
インタフェース HIR0 の記述:
getFlagBox Users are recommended to use getFlag( int pFlagNumber ) except when they understand the treatment of FlagBox in detail.

定義:
インタフェース HIR0 内の getFlagBox
戻り値:
the flag box attached to this node; null if flag box is not attached (no flag is set).

clone

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

オーバーライド:
クラス java.lang.Object 内の clone
戻り値:
cloned HIR object.
例外:
java.lang.CloneNotSupportedException

getClone

public IR getClone()
            throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException

hirClone

public HIR hirClone()
インタフェース HIR0 の記述:
hirClone Make the clone of this node to get a clone in the situation where clone() can not be used directly.

定義:
インタフェース HIR0 内の hirClone
戻り値:
the clone of this node.

hirNodeClone

public HIR hirNodeClone()
インタフェース HIR の記述:
Make a copy of this HIR node without copying children.

定義:
インタフェース HIR 内の hirNodeClone
戻り値:
the copy of this node with null children.

copyWithOperands

public HIR copyWithOperands()
インタフェース HIR0 の記述:
copyWithOperands
  Make a subtree that is the same to this subtree.
  (Labels are not renamed.)
  In general, a subtree represents the computation of
  an operation and also the computation of its operands.
  Flow information is invalid as for copied subtree and
  should be computed again if required.
  If the subtree contains labels, it is recommended to use
  copyWithOperandsChangingLabels. Note that, IfStmt, LoopStmt
  (for, while, until, etc.), SwitchStmt
  contain internal labels and it is recommended to use
  copyWithOperandsChangingLabels to the subtree that may contain
  these statements.
  "this" should be the root node of a subtree contained
  in a subprogram body. Subprogram body itself should not be copied.

定義:
インタフェース HIR0 内の copyWithOperands
戻り値:
the subtree made by the copy operation.

copyWithOperandsChangingLabels

public HIR copyWithOperandsChangingLabels(IrList pLabelCorrespondence)
copyWithOperandsChangingLabels Copy this subtree changing labels that are defined in this subtree to avoid label duplication.

定義:
インタフェース HIR0 内の copyWithOperandsChangingLabels
パラメータ:
pLabelCorrespondence - null if this method is called from outside HIR access methods. If it is null, it is computed in this method and passed to subclasses after copyWithOperands (without changing label).
戻り値:
the subtree with labels changed.

isTree

protected boolean isTree(java.util.Set pVisitedNodes,
                         int pErrorCounter,
                         java.util.Set pSetOfLabels)
isTree Test if this does not violates tree structure, that is, detect node adherence in branches and handshake miss in parent-child relation. Issues message if some node is encountered twice in the process of traversing this subtree.

パラメータ:
pVisitedNodes - Give null in usual case; Set of visited nodes is given when isTree is invoked recursively by isTree.
戻り値:
true if this a tree else return false.

isTree

public boolean isTree()
インタフェース HIR の記述:
isTree Test if this does not violates tree structure, that is, detect node adherence in branches and handshake miss in parent-child relation. Issues message if some node is encountered twice in the process of traversing this subtree. If there is duplicated label definition, then return false. //##60

定義:
インタフェース HIR 内の isTree
戻り値:
true if this a tree else return false.

isSameAs

public boolean isSameAs(HIR pTree)
isSameAs Compare this tree with pTree and if they have the same tree shape (same operator and same operands) then return true. In the comparison, attributes are not compared. (This method is public but less efficient than the protected method isSameTree in flow.HirSubpFlowImpl.)

定義:
インタフェース HIR0 内の isSameAs
パラメータ:
pTree - HIR tree to be compared.
戻り値:
true if this tree has the same shape as pTree, false otherwise.

checkLinkage

public void checkLinkage(java.lang.String pHeader)
インタフェース HIR の記述:
Check parent-child linkage if debug level (ioRoot.dbgHir.getLevel()) is greater than 0. If the linkage is incorrect, issue message.

定義:
インタフェース HIR 内の checkLinkage
パラメータ:
pHeader - name of HIR modification operation.

subpIterator

public java.util.Iterator subpIterator()
インタフェース HIR の記述:
subpIterator Make an iterator that traverses all subprogram definitions in the current compile unit. Sequence of SubpDefinition will be get by using next() of the iterator successively.

定義:
インタフェース HIR 内の subpIterator
戻り値:
the iterator to traverse subprogram definitions.

hirIterator

public HirIterator hirIterator(IR pSubtree)
インタフェース HIR0 の記述:
hirIterator
  Get an iterator to traverse all nodes or statements under
  pSubtree. YOu can traverse the subtree by following methods
  of HirIterator
     next(): traverse all nodes.
     getNextStmt(): traverse all statements.
     getNextExecutableNode(): traverse executable nodes only.
  See HirIterator interface.
 

定義:
インタフェース HIR0 内の hirIterator
パラメータ:
pSubtree - root of the subtree to be traversed.
戻り値:
teh resultant HirIterator.

accept

public void accept(HirVisitor pVisitor)
インタフェース HIR0 の記述:
accept Acceptor used in HIR visitor. See HirVisitor, HirVisitorModel1, HirVisitormodel2.

定義:
インタフェース HIR0 内の accept
パラメータ:
pVisitor - HirVisitor