coins.sym
クラス VarImpl
java.lang.Object
|
+--coins.sym.SymImpl
|
+--coins.sym.VarImpl
- すべての実装インタフェース:
- java.lang.Cloneable, FlowAnalSym, HasStringObject, Sym, Sym0, Var
- 直系の既知のサブクラス:
- ElemImpl, ParamImpl
- public class VarImpl
- extends SymImpl
- implements Var, FlowAnalSym
VarImpl Class represents Variable symbols.
Sym --- Symbol class (super class of all symbol classes).
|
|- OperandSym
| |
| |- Var --- Variable that can be assigned a value <---- This!
| | | and variable with const attribute.
| | |- Param --- Formal parameter class.
| | |- Elem --- Class for structure element,
| | union element, etc.
フィールドの概要 |
protected IrList |
fDefList
Definition list containing IR nodes that define the
value of this symbol. |
protected DefUseList |
fDefUseList
Definition point and using points of this variable |
protected int |
fIndex
|
protected java.util.Set |
fOperandSet
|
protected IrList |
fUseList
Use list containing IR nodes that use (refer) this symbol. |
クラス coins.sym.SymImpl から継承したフィールド |
fDbgLevel, fDefinedIn, fFlagBox, fKind, fName, fNextSym, fRecordedIn, fSourceInf, fSymInf, fType, fUniqueNameSym, fWork, machineParam, sourceLanguage, symRoot |
インタフェース coins.sym.Sym0 から継承したフィールド |
FLAG_ADDRESS_TAKEN, FLAG_CASTLESS_SUBP, FLAG_COMMON, FLAG_COMPLEX_STRUCT, FLAG_DERIVED_SYM, FLAG_GENERATED_SYM, FLAG_INCOMPLETE_TYPE, FLAG_POINTER_OPERATION, FLAG_REGION_ELEM, FLAG_RESERVED_NAME, FLAG_SIZEOF_TAKEN, FLAG_UNFIXED_SIZE, FLAG_UNIFORM_SIZE, FLAG_VALUE_IS_ASSIGNED, KIND_AREG, KIND_BOOL_CONST, KIND_CHAR_CONST, KIND_CONST_FIRST, KIND_CONST_LAST, KIND_ELEM, KIND_EXP_ID, KIND_FLOAT_CONST, KIND_INT_CONST, KIND_LABEL, KIND_MREG, KIND_NAMED_CONST, KIND_OTHER, KIND_PARAM, KIND_REMOVED, KIND_STRING_CONST, KIND_SUBP, KIND_TAG, KIND_TYPE, KIND_VAR, SYM_COMPILE_UNIT, SYM_EXTERN, SYM_PRIVATE, SYM_PROTECTED, SYM_PUBLIC |
メソッドの概要 |
void |
addOperand(FlowAnalSym pOperand)
|
java.lang.Object |
evaluateAsObject()
Get the value of this constant symbol.
|
int |
getDimension()
getDimension
Get the dimension of this variable.
|
int |
getIndex()
getDefUseList
Get DefUseList (list of definition points and use points) of this variable.
|
Exp |
getInitialValue()
getInitialValue
Get the expression of initial value for this variable.
|
Var |
getNext()
getNext
Get the next variable having the same scope and the same kind.
|
java.util.Set |
getOperandSet()
getOperandSet
Get the set of operands used in computing the value
of this abstract register. |
long |
getSize()
getSize
Get the size of this variable in byte if it is evaluable.
|
int |
getStorageClass()
getStrageClass
Get the storage class of the variable.
|
int |
getVisibility()
getVisibility
Get the visibility attribute of the variable.
|
boolean |
isSizeEvaluable()
isSizeEvaluable
Check this variable is evaluable or not.. |
void |
resetFlowAnalInf()
resetFlowAnalInf
Reset information for flow analysis, that is,
nullify DefUseList, definition list, use list, ExpId,
and reset the index value to 0. |
void |
setIndex(int pIndex)
setIndex
Set the index number assigned to the symbol.
|
void |
setInitialValue(Exp pInitialValue)
setInitialValue
Set the expression of initial value for this variable.
|
void |
setNext(Var pNext)
setNext
Set the variable specified by parameter as the one next to this symbol,
and make the original next variable of this symbol as the one
next to pNext (that is, insert pNext after this symbol).
|
void |
setStorageClass(int pStorageClass)
setStrageClass
Set the storage class of the variable.
|
void |
setVisibility(int pVisibility)
setVisibility
Set the visibility attribute of the variable.
|
java.lang.String |
toStringDetail()
toStringDetail
Get detailed attributes of this symbol in text which is not
interned. |
クラス coins.sym.SymImpl から継承したメソッド |
bareStringConst, baseType, boolConst, charConst, charConst, charConst, definedType, definedType, defineElem, defineLabel, defineParam, defineRegionVar, defineSubp, defineVar, defineVar, derivedSym, enumType, enumType, floatConst, floatConst, getDefinedColumn, getDefinedFile, getDefinedIn, getDefinedInName, getDefinedLine, getFlag, getInf, getName, getNameOrNull, getNextSym, getOrAddInf, getOriginalSym, getOriginalSym, getPureName, getRecordedIn, getSourceInf, getSymKind, getSymKindName, getSymType, getUniqueName, getWork, intConst, intConst, intObject, isGlobal, isHIR, isRemoved, isSym, linkSym, makeCstring, makeCstringWithTrailing0, makeEnumTypeName, makeExpString, makeJavaString, makeStructUnionTypeName, makeSubpTypeName, makeSubpTypeName, makeVectorTypeName, makeVectorTypeName, makeVectorTypeName, namedConst, namedConst, pointerType, pointerType, pointerType, pointerType, pointerType, print, print, regionType, regionType, remove, setDefinedFile, setDefinedIn, setDefinedLine, setFlag, setOriginalSym, setParameters, setRecordedIn, setSourceInf, setSymKind, setSymType, setUniqueNameSym, setWork, stringConst, stringConstFromQuotedString, structType, structType, subpType, subpType, symbol, toString, toStringShort, unionType, unionType, vectorType, vectorType, vectorType, vectorType, vectorTypeUnfixed, vectorTypeUnfixed |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
インタフェース coins.sym.Sym から継承したメソッド |
baseType, boolConst, charConst, defineVar, derivedSym, floatConst, getDefinedColumn, getDefinedInName, getDefinedLine, getInf, getNameOrNull, getOrAddInf, getOriginalSym, getOriginalSym, getPureName, getSymKindName, getWork, intConst, intObject, isRemoved, makeCstring, makeCstringWithTrailing0, makeEnumTypeName, makeJavaString, makeStructUnionTypeName, makeSubpTypeName, makeVectorTypeName, makeVectorTypeName, makeVectorTypeName, namedConst, pointerType, pointerType, pointerType, regionType, remove, setDefinedFile, setDefinedIn, setDefinedLine, setRecordedIn, setSymKind, setSymType, setUniqueNameSym, setWork, stringConstFromQuotedString, symbol, toStringShort, vectorType, vectorType, vectorType, vectorTypeUnfixed |
インタフェース coins.sym.Sym0 から継承したメソッド |
charConst, definedType, defineElem, defineLabel, defineParam, defineSubp, defineVar, enumType, floatConst, getDefinedFile, getDefinedIn, getFlag, getName, getNextSym, getRecordedIn, getSymKind, getSymType, getUniqueName, intConst, isGlobal, namedConst, pointerType, setFlag, stringConst, structType, subpType, unionType, vectorType, vectorTypeUnfixed |
fDefUseList
protected DefUseList fDefUseList
- Definition point and using points of this variable
fDefList
protected IrList fDefList
- Definition list containing IR nodes that define the
value of this symbol.
fUseList
protected IrList fUseList
- Use list containing IR nodes that use (refer) this symbol.
fIndex
protected int fIndex
fOperandSet
protected java.util.Set fOperandSet
VarImpl
public VarImpl(SymRoot pSymRoot)
VarImpl
public VarImpl(SymRoot pSymRoot,
java.lang.String pName)
getNext
public Var getNext()
- getNext
Get the next variable having the same scope and the same kind.
The order of symbols is the same as the order of creation by
defineUnique, define, redefine or setting by setNext.
"this" should be a variable.
- 定義:
- インタフェース
Var
内の getNext
- 戻り値:
- the variable next to this one in the same scope and the same
kind, e.g. the next local variable in the same construct,
the next formal parameter of the same subprogram,
the next element of the same structure,
the next field of the same class, etc.
return null if this is the last one in the same construct.
setNext
public void setNext(Var pNext)
- setNext
Set the variable specified by parameter as the one next to this symbol,
and make the original next variable of this symbol as the one
next to pNext (that is, insert pNext after this symbol).
(Default ordering is the order of creation by DefineUnique, Define,
Redefine.)
"this" is a variable.
- 定義:
- インタフェース
Var
内の setNext
- パラメータ:
pNext
- variable to be set as the next one. It should be defined
in the same construct as this variable.
getSize
public long getSize()
- getSize
Get the size of this variable in byte if it is evaluable.
"this" may be any variable.
- 定義:
- インタフェース
Var
内の getSize
- 戻り値:
- the size of the type of this variable if
it is evaluable. If it is not evaluable, return 0.
isSizeEvaluable
public boolean isSizeEvaluable()
- isSizeEvaluable
Check this variable is evaluable or not..
- 定義:
- インタフェース
Var
内の isSizeEvaluable
- 戻り値:
- boolean the size of the type of this variable is evaluable true
false otherwise.
getDimension
public int getDimension()
- getDimension
Get the dimension of this variable.
"this" is a variable.
- 定義:
- インタフェース
Var
内の getDimension
- 戻り値:
- the dimension of this variable if this is an array variable.
1: 1-dimensinal array, 2: 2-dimensional array, ,,, .
If this is not array variable, return 0.
getInitialValue
public Exp getInitialValue()
- getInitialValue
Get the expression of initial value for this variable.
"this" may be any variable that may have initial value.
- 定義:
- インタフェース
Var
内の getInitialValue
- 戻り値:
- Exp initial value expression subtree
If no initial value null.
setInitialValue
public void setInitialValue(Exp pInitialValue)
- setInitialValue
Set the expression of initial value for this variable.
"this" may be any variable that may have initial value.
- 定義:
- インタフェース
Var
内の setInitialValue
- パラメータ:
pInitialValue
- initial value expression subtree.
Set initial value expression for this variable.
getStorageClass
public int getStorageClass()
- getStrageClass
Get the storage class of the variable.
"this" may be any variable.
- 定義:
- インタフェース
Var
内の getStorageClass
- 戻り値:
- int the storage class of the variable
setStorageClass
public void setStorageClass(int pStorageClass)
- setStrageClass
Set the storage class of the variable.
"this" may be any variable.
- 定義:
- インタフェース
Var
内の setStorageClass
- パラメータ:
pStorageClass
- storage class to be set to this variable
getVisibility
public int getVisibility()
- getVisibility
Get the visibility attribute of the variable.
(SYM_EXTERN, SYM_PUBLIC, SYM_PROTECTED, SYM_PRIVATE,
SYM_COMPILE_UNIT).
- 定義:
- インタフェース
Var
内の getVisibility
- 戻り値:
- the visibility attribute.
setVisibility
public void setVisibility(int pVisibility)
- setVisibility
Set the visibility attribute of the variable.
"this" may be any variable.
- 定義:
- インタフェース
Var
内の setVisibility
- パラメータ:
pVisibility
- visibility attribute to be set by setVisibility.
(SYM_EXTERN, SYM_PUBLIC, SYM_PROTECTED, SYM_PRIVATE,
SYM_COMPILE_UNIT).
getIndex
public int getIndex()
- getDefUseList
Get DefUseList (list of definition points and use points) of this variable.
"this" is a variable.
- 定義:
- インタフェース
FlowAnalSym
内の getIndex
- 戻り値:
- the DefUseList of this variable if it is computed.
If it is not computed, return null.
Note symRoot.flow should be set before call by FlowRoot.
setIndex
public void setIndex(int pIndex)
- インタフェース
FlowAnalSym
の記述:
- setIndex
Set the index number assigned to the symbol.
The index number is used in data flow analysis, etc.
For ExpId, do not use setIndex but use setLinkedNode.
- 定義:
- インタフェース
FlowAnalSym
内の setIndex
- パラメータ:
pIndex
- index number to be set to this symbol.
resetFlowAnalInf
public void resetFlowAnalInf()
- インタフェース
FlowAnalSym
の記述:
- resetFlowAnalInf
Reset information for flow analysis, that is,
nullify DefUseList, definition list, use list, ExpId,
and reset the index value to 0.
- 定義:
- インタフェース
FlowAnalSym
内の resetFlowAnalInf
getOperandSet
public java.util.Set getOperandSet()
- インタフェース
FlowAnalSym
の記述:
- getOperandSet
Get the set of operands used in computing the value
of this abstract register. The operands are either
Var or Reg, excluding Const (Const is not FlowAnalSym).
- 定義:
- インタフェース
FlowAnalSym
内の getOperandSet
- 戻り値:
- the set of operands.
addOperand
public void addOperand(FlowAnalSym pOperand)
toStringDetail
public java.lang.String toStringDetail()
- インタフェース
Sym
の記述:
- toStringDetail
Get detailed attributes of this symbol in text which is not
interned.
- 定義:
- インタフェース
Sym
内の toStringDetail
- オーバーライド:
- クラス
SymImpl
内の toStringDetail
evaluateAsObject
public java.lang.Object evaluateAsObject()
- Get the value of this constant symbol.
This method is overrided as follows
class returned value
IntConst Long
FloatConst Double
StringConst String
Var Initail value (ExpListExp, etc.) if qualified by const,
else null.
- 定義:
- インタフェース
Var
内の evaluateAsObject
- 戻り値:
- the constant value of appropriate type.