|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.ir.hir.HIR_Impl
coins.ir.hir.SubpDefinitionImpl
Subprogram definition node.
| Field Summary | |
int |
fNodeIndexMax
fNodeIndexMin Minimum of the node index. |
int |
fNodeIndexMin
fNodeIndexMin Minimum of the node index. |
| Fields inherited from class coins.ir.hir.HIR_Impl |
fAdditionalChild, fChildCount, fChildNode1, fChildNode2, fDbgLevel, fHirAnnex, fOperator, fParentNode, fType, hirRoot, inversionTable, machineParam, sourceLanguage |
| Fields inherited from interface coins.ir.hir.HIR |
OP_CODE_NAME, OP_CODE_NAME_DENSE |
| Fields inherited from interface coins.ir.IR |
OP_INF, OP_LIST, OP_PROG, OP_SUBP_DEF |
| Constructor Summary | |
SubpDefinitionImpl(HirRoot pHirRoot,
Subp pSubpSym,
SymTable pLocalSymTable,
BlockStmt pInitiation,
BlockStmt pHirBody)
|
|
| Method Summary | |
void |
accept(HirVisitor pVisitor)
accept Acceptor used in HIR visitor. |
void |
addInitiationStmt(Stmt pStmt)
Add pInitiationStmt to the tail of the block containing initiation statements that should be executed at the entry to the subprogram. |
java.lang.Object |
clone()
clone Override Object.clone in HIR. |
HIR |
copyWithOperandsChangingLabel(IrList pLabelCorrespondence)
|
Stmt |
getHirBody()
Get the body part of the subprogram. |
BlockStmt |
getInitiationPart()
Get the block containing statements that initiate variables local to the subprogram. |
int |
getNodeIndexMax()
Get the node index attached at the last node of the subprogram definition. |
int |
getNodeIndexMin()
Get the node index attached at the first node of the subprogram definition. |
Label |
getStartLabel()
Get the start label that is attached at the head of subprogram body. |
Subp |
getSubpSym()
Get the subprogram symbol of this subprogram definition. |
SymTable |
getSymTable()
Get the symbol table local to the subprogram. |
void |
print(int pIndent,
boolean pDetail)
print Print this subtree in text format traversing all children of this node. |
void |
printHir(java.lang.String pHeader)
printHir Print the HIR body of this subprogram. |
void |
setHirBody(BlockStmt pHirBody)
Set pHirBody as the body part of the subprogram. |
void |
setSymTable(SymTable pSymTable)
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface coins.ir.hir.HIR |
addrExp, asmStmt, checkLinkage, conditionalExp, contains, copyInfListFrom, cutParentLink, exp, expList, expRepeat, forStmt, getExpId, getFlowAnalSym, getIndentSpace, getInfString, getIrName, getSourceNode, getSourceNode1, getSourceNode2, getSymOrExpId, getWork, hirNodeClone, hirSeq, hirSeq, indexedLoopStmt, indexedLoopStmt, infStmt, infStmt, intConstNode, irList, isEmpty, isStmt, isTree, nullNode, nullStmt, offsetConstNode, phiExp, repeatStmt, replaceSource, replaceSource1, replaceSource2, returnStmt, setChild1, setChild2, setChildren, setChildren, setDataStmt, setIndex, setIndexNumberToAllNodes, setParent, setType, setWork, subpDefinition, subpIterator, subscriptedExp, toString, toStringDetail, toStringShort, toStringWithChildren, undecayExp, undecayExp, undecayExp, whileStmt |
| Methods inherited from interface coins.ir.IR |
addInf, getChild1, getChild2, getInf, getInfList, getParent, getSym, print, removeInf |
| Methods inherited from interface coins.ir.IR0 |
getChild, getChildCount, getIndex, getOperator, setChild |
| Methods inherited from interface coins.ir.hir.HIR0 |
assignStmt, blockStmt, callStmt, constNode, contentsExp, convExp, copyWithOperands, copyWithOperandsChangingLabels, decayExp, elemNode, exp, exp, expStmt, falseNode, finishHir, forStmt, functionExp, getChildNumber, getFlag, getFlagBox, getNextStmt, getStmtContainingThisNode, getType, hirClone, hirIterator, hirList, hirSeq, ifStmt, intConstNode, irList, isSameAs, jumpStmt, labelDef, labeledStmt, labelNode, pointedExp, program, qualifiedExp, repeatStmt, replaceThisNode, returnStmt, setFlag, setIndexNumberToAllNodes, sizeofExp, sizeofExp, subpDefinition, subpNode, subscriptedExp, switchStmt, symNode, trueNode, undecayExp, varNode, whileStmt |
| Field Detail |
public int fNodeIndexMin
public int fNodeIndexMax
| Constructor Detail |
public SubpDefinitionImpl(HirRoot pHirRoot,
Subp pSubpSym,
SymTable pLocalSymTable,
BlockStmt pInitiation,
BlockStmt pHirBody)
| Method Detail |
public SymTable getSymTable()
SubpDefinition
getSymTable in interface SubpDefinitionpublic void setSymTable(SymTable pSymTable)
public Subp getSubpSym()
SubpDefinition
getSubpSym in interface SubpDefinitionpublic BlockStmt getInitiationPart()
SubpDefinitionGet the block containing statements that initiate variables local to the subprogram. Note: In C language, initial value specification should be evaluated at the position where the initial value declaration statement encountered. This means that the initiation statement in HIR should be placed at the position where the declaration statement is encountered, just as executable statement. Thus, if the source language is C, getInitiationPart() will return empty BlockStmt or null.
getInitiationPart in interface SubpDefinitionpublic void addInitiationStmt(Stmt pStmt)
SubpDefinition
addInitiationStmt in interface SubpDefinitionpStmt - to be added to the initiation block.public Stmt getHirBody()
SubpDefinition
getHirBody in interface SubpDefinitionpublic void setHirBody(BlockStmt pHirBody)
SubpDefinition
setHirBody in interface SubpDefinitionpHirBody - body part to be set.public Label getStartLabel()
SubpDefinition
getStartLabel in interface SubpDefinitionpublic HIR copyWithOperandsChangingLabel(IrList pLabelCorrespondence)
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
HIR_Impl
clone in class HIR_Impljava.lang.CloneNotSupportedException
public void print(int pIndent,
boolean pDetail)
IR
print in interface IRprint in class HIR_Implpublic void printHir(java.lang.String pHeader)
SubpDefinition
printHir in interface SubpDefinitionpHeader - Header message to be printed.public void accept(HirVisitor pVisitor)
HIR0
accept in interface HIR0accept in class HIR_Implpublic int getNodeIndexMin()
SubpDefinition
getNodeIndexMin in interface SubpDefinitionpublic int getNodeIndexMax()
SubpDefinition
getNodeIndexMax in interface SubpDefinition
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||