|
||||||||||
| 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
coins.ir.hir.ExpListExpImpl
ExpListExpImpl Expression representing a list of expressions (Exp). Its operator is OP_EXPLIST. This is used to represent a list of initial values. The element of the list may be a repetition specification that specifies repetition count (as child 1) and elements to be repeated (as child 2).
| Field Summary | |
(package private) java.util.LinkedList |
values
|
| 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 | |
ExpListExpImpl(HirRoot pHirRoot,
java.util.List list)
|
|
| Method Summary | |
void |
add(int pInsertionPosition,
java.lang.Object pObjectToBeInserted)
|
void |
add(java.lang.Object pElement)
Specifications of following methods are the same to those of List in java.util. |
void |
clear()
|
java.lang.Object |
clone()
clone Override Object.clone in HIR. |
boolean |
contains(java.lang.Object pObject)
|
java.lang.Object |
get(int pIndex)
|
Exp |
getExp(int index)
getExp Get the i-th element of the expression list, where i is given by the parameter pIndex. |
java.lang.Object |
getFirst()
|
Exp |
getWithRepeat(int index)
getWithRepeat |
HirList |
hirListClone()
hirListClone Make the clone of this node to get a clone in the situation where clone() can not be used directly. |
int |
indexOf(java.lang.Object pObject)
|
boolean |
isEmpty()
|
java.util.ListIterator |
iterator()
Make iterator to traverse all elements of the list. |
int |
length()
length |
void |
print(int indent)
Print the list enclosing the string images of all elements by parenthesis. |
void |
print(int indent,
boolean detail)
Print the list enclosing the detailed string images of all elements by parenthesis. |
java.lang.Object |
remove(int pRemovePosition)
|
boolean |
remove(java.lang.Object pObject)
|
void |
set(int pIndex,
java.lang.Object pElement)
|
void |
setExp(int index,
Exp exp)
set Set pExp as pIndex-th element of the expression list. |
int |
size()
size |
java.lang.String |
toStringWithChildren()
toStringWithChildren Get the string of this node and its children traversing the children in depth-first order. |
| Methods inherited from class coins.ir.hir.ExpImpl |
accept, adjustTypesOfBinaryOperands, evaluate, evaluateAsDouble, evaluateAsFloat, evaluateAsInt, evaluateAsLong, findSubpType, fold, getActualParamList, getArrayExp, getConstSym, getElem, getElemSizeExp, getExp1, getExp2, getLabel, getPointedElem, getPointerExp, getQualifiedElem, getQualifierExp, getSubp, getSubpSpec, getSubscriptExp, getSym, getValueString, getVar, initiateArray, isEvaluable, isLValue |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface coins.ir.hir.ExpListExp |
toString |
| Methods inherited from interface coins.ir.hir.Exp |
adjustTypesOfBinaryOperands, evaluate, evaluateAsDouble, evaluateAsFloat, evaluateAsInt, evaluateAsLong, findSubpType, fold, getActualParamList, getArrayExp, getConstSym, getElem, getElemSizeExp, getExp1, getExp2, getLabel, getPointedElem, getPointerExp, getQualifiedElem, getQualifierExp, getSubp, getSubpSpec, getSubscriptExp, getValueString, getVar, initiateArray, isEvaluable |
| 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, toStringDetail, toStringShort, undecayExp, undecayExp, undecayExp, whileStmt |
| Methods inherited from interface coins.ir.IR |
addInf, getChild1, getChild2, getInf, getInfList, getParent, getSym, removeInf |
| Methods inherited from interface coins.ir.IR0 |
getChild, getChildCount, getIndex, getOperator, setChild |
| Methods inherited from interface coins.ir.hir.HIR0 |
accept, 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 |
| Methods inherited from interface coins.ir.IrList |
getClone, toStringShort |
| Field Detail |
java.util.LinkedList values
| Constructor Detail |
public ExpListExpImpl(HirRoot pHirRoot,
java.util.List list)
| Method Detail |
public int size()
ExpListExp
size in interface ExpListExppublic int length()
ExpListExp
length in interface ExpListExppublic Exp getExp(int index)
ExpListExp
getExp in interface ExpListExpindex - element index number.
public Exp getWithRepeat(int index)
ExpListExp
Get the i-th final element of the expression list assuming as if
the nest of list is expanded, where i is given by the parameter
pIndex.
If the i-th element is (exprepeatCode n elem), then
elem is assumed to be repeated n-times and its first one
is treated as the i-th element.
If there is no i-th element, return null.
The end of list may be detected by encountering null
as the return value of getWithRepeat method.
Example
Given list:
(OP_EXPLIST c1 c2 (OP_EXPREPEAT c3 c4) c5)
Sequence of Exp to be get by getWithRepeat:
c1 c2 c4 c4 c4 c5
where, each of c1, c2, c3, c4, c5 represents constant expression
whose value is 1, 2, 3, 4, 5 respectively.
getWithRepeat in interface ExpListExpindex - index number corresponding to the element
to be returned.
public void setExp(int index,
Exp exp)
ExpListExp
setExp in interface ExpListExpindex - index number corresponding to the element
to be set.exp - element to be set.
public void set(int pIndex,
java.lang.Object pElement)
set in interface HirListpublic void add(java.lang.Object pElement)
HirList
Specifications of following methods are the same
to those of List in java.util.
add
isEmpty
size
contains
indexOf
remove
listIterator
add in interface HirList
public void add(int pInsertionPosition,
java.lang.Object pObjectToBeInserted)
add in interface HirListpublic java.lang.Object getFirst()
getFirst in interface HirListpublic java.lang.Object get(int pIndex)
get in interface HirListpublic boolean isEmpty()
isEmpty in interface HirListpublic boolean contains(java.lang.Object pObject)
contains in interface HirListpublic int indexOf(java.lang.Object pObject)
indexOf in interface HirListpublic java.lang.Object remove(int pRemovePosition)
remove in interface HirListpublic boolean remove(java.lang.Object pObject)
remove in interface HirListpublic void clear()
clear in interface IrListpublic java.util.ListIterator iterator()
ExpListExp
iterator in interface ExpListExp
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
HIR_Impl
clone in class HIR_Impljava.lang.CloneNotSupportedException
public HirList hirListClone()
throws java.lang.CloneNotSupportedException
HirList
hirListClone in interface HirListjava.lang.CloneNotSupportedExceptionpublic void print(int indent)
ExpListExp
print in interface ExpListExpprint in class HIR_Impl
public void print(int indent,
boolean detail)
ExpListExp
print in interface ExpListExpprint in class HIR_Implpublic java.lang.String toStringWithChildren()
HIR
toStringWithChildren in interface HIRtoStringWithChildren in class HIR_Impl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||