|
||||||||||
| 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.ExpImpl
ExpImpl HIR expression class. The expression class Exp is a subclass of HIR.
| Field Summary |
| 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 | |
ExpImpl(HirRoot pHirRoot)
|
|
ExpImpl(HirRoot pHirRoot,
int pOperator)
|
|
ExpImpl(HirRoot pHirRoot,
int pOperator,
Exp pExp1)
Build an instance of unary expression. |
|
ExpImpl(HirRoot pHirRoot,
int pOperator,
Exp pExp1,
Exp pExp2)
Build an instance of binary expression. |
|
ExpImpl(HirRoot pHirRoot,
int pOperator,
Exp pExp1,
Exp pExp2,
Exp pExp3)
|
|
| Method Summary | |
void |
accept(HirVisitor pVisitor)
accept Acceptor used in HIR visitor. |
Exp |
adjustTypesOfBinaryOperands(Exp pExp1,
Exp pExp2)
Adjust the types of binary operands according to the C language specifications (See ISO/IEC 9899-1999 Programming language C section 6.3.1.8). |
Const |
evaluate()
Evaluate "this" expression. |
double |
evaluateAsDouble()
evaluateAsDouble Evaluate "this" expression as double. |
float |
evaluateAsFloat()
evaluateAsFloat Evaluate "this" expression as float. |
int |
evaluateAsInt()
evaluateAsInt Evaluate "this" expression as int. |
long |
evaluateAsLong()
Evaluate "this" expression as long. |
SubpType |
findSubpType()
findSubpType Find SubpType represented by this expression. |
Exp |
fold()
Fold "this" expression. |
IrList |
getActualParamList()
|
Exp |
getArrayExp()
getArrayExp (##2) getSubscriptExp getElemSizeExp (##2) Get a component of a subscripted variable. |
Const |
getConstSym()
getConstSym Get constant symbol attached to this node. |
Elem |
getElem()
getElem Get symbol of spefified class from SymNode. |
Exp |
getElemSizeExp()
|
Exp |
getExp1()
getExp1 Get source operand 1 from unary or binary expression. |
Exp |
getExp2()
getExp2 Get source operand 2 from binary expression. |
Label |
getLabel()
getLabel Get symbol of spefified class from SymNode. |
Elem |
getPointedElem()
|
Exp |
getPointerExp()
getPointerExp getPointedElem Get a component of pointed variable expression. |
Elem |
getQualifiedElem()
|
Exp |
getQualifierExp()
getQualifier getQualifiedElem Get a component of qualified variable expression. |
Subp |
getSubp()
getSubp Get symbol of spefified class from SymNode. |
Exp |
getSubpSpec()
getSubpSpec (##2) getActualParamList Get a component expression of the function expression. |
Exp |
getSubscriptExp()
|
Sym |
getSym()
getSym Get symbol from SymNode. |
java.lang.String |
getValueString()
getValueString //##40 Evaluate this subtree and return the result as a string. |
Var |
getVar()
getVar Get symbol of specified class from SymNode. |
Stmt |
initiateArray(Exp pArray,
Exp pInitExp,
Exp pFrom,
Exp pTo,
Subp pSubp)
initiateArray //##15 Create loop statement to initiate all elements of the array pArray and append it to the initiation block of subprogram pSubp. |
boolean |
isEvaluable()
isEvaluable: See if "this" expression can be currently evaluated or not. |
boolean |
isLValue()
|
| 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, print, 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, print, program, qualifiedExp, repeatStmt, replaceThisNode, returnStmt, setFlag, setIndexNumberToAllNodes, sizeofExp, sizeofExp, subpDefinition, subpNode, subscriptedExp, switchStmt, symNode, trueNode, undecayExp, varNode, whileStmt |
| Constructor Detail |
public ExpImpl(HirRoot pHirRoot)
public ExpImpl(HirRoot pHirRoot,
int pOperator)
public ExpImpl(HirRoot pHirRoot,
int pOperator,
Exp pExp1)
pHirRoot - Specify the current instance of HirRoot.pOperator - Operator of the unary expression.pExp1 - Operand expression.
public ExpImpl(HirRoot pHirRoot,
int pOperator,
Exp pExp1,
Exp pExp2)
pHirRoot - Specify the current instance of HirRoot.pOperator - Operator of the binary expression.pExp1 - Operand 1 expression.
public ExpImpl(HirRoot pHirRoot,
int pOperator,
Exp pExp1,
Exp pExp2,
Exp pExp3)
| Method Detail |
public Const getConstSym()
getConstSym in interface Exppublic Sym getSym()
getSym in interface IRgetSym in class HIR_Implpublic Var getVar()
Exp
getVar in interface Exppublic Subp getSubp()
Exp
getSubp in interface Exppublic Label getLabel()
Exp
getLabel in interface Exppublic Elem getElem()
Exp
getElem in interface Exppublic Exp getExp1()
getExp1 in interface Exppublic Exp getExp2()
getExp2 in interface Exppublic Exp getArrayExp()
Exp
getArrayExp in interface Exppublic Exp getSubscriptExp()
getSubscriptExp in interface Exppublic Exp getElemSizeExp()
getElemSizeExp in interface Exppublic Exp getPointerExp()
Exp
getPointerExp in interface Exppublic Elem getPointedElem()
getPointedElem in interface Exppublic Exp getQualifierExp()
Exp
getQualifierExp in interface Exppublic Elem getQualifiedElem()
getQualifiedElem in interface Exppublic Exp getSubpSpec()
getSubpSpec in interface Exppublic IrList getActualParamList()
getActualParamList in interface Exppublic SubpType findSubpType()
findSubpType in interface Exppublic boolean isEvaluable()
isEvaluable in interface Exppublic Const evaluate()
evaluate in interface Exppublic int evaluateAsInt()
Exp
evaluateAsInt in interface Exppublic long evaluateAsLong()
Exp
evaluateAsLong in interface Exppublic float evaluateAsFloat()
Exp
evaluateAsFloat in interface Exppublic double evaluateAsDouble()
Exp
evaluateAsDouble in interface Exp
public Exp adjustTypesOfBinaryOperands(Exp pExp1,
Exp pExp2)
Exp
adjustTypesOfBinaryOperands in interface ExppExp1 - operand 1.pExp2 - operand 2.
public Exp fold()
fold in interface Exp
public Stmt initiateArray(Exp pArray,
Exp pInitExp,
Exp pFrom,
Exp pTo,
Subp pSubp)
Exp
initiateArray in interface ExppArray - array variable expression.pInitExp - initial value to be set.pFrom - array index start positionpTo - array index end positionpSubp - subprogram containing the initiation statement.
null for global variable initiation.
public java.lang.String getValueString()
Exp
getValueString in interface Exppublic boolean isLValue()
public void accept(HirVisitor pVisitor)
HIR0
accept in interface HIR0accept in class HIR_Impl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||