coins.sym
インタフェース Var

すべてのスーパーインタフェース:
Sym, Sym0
既知のサブインタフェースの一覧:
Elem, Param
既知の実装クラスの一覧:
ElemImpl, ParamImpl, VarImpl

public interface Var
extends Sym

Var interface Variable interface Var Variable Param Formal parameter Elem struct/union element Field Class field Deleted methods (##2) getType, setType, setSize, setDimension


フィールドの概要
static java.lang.String[] STORAGECLASS
           
static int VAR_AUTO
           
static int VAR_REGISTER
           
static int VAR_STATIC
           
 
インタフェース coins.sym.Sym から継承したフィールド
KIND_NAME, VISIBILITY
 
インタフェース 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
 
メソッドの概要
 java.lang.Object evaluateAsObject()
          Available flags Sym.FLAG_SIZEOF_TAKEN Sym.FLAG_ADDRESS_TAKEN Sym.FLAG_POINTER_OPERATION Sym.FLAG_AREG_ALLOCATED Sym.FLAG_DERIVED_SYM Sym.FLAG_GENERATED_SYM
 int getDimension()
          getDimension Get the dimension 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.
 long getSize()
          getSize isSizeEvaluable Get the size of this variable in byte if it is evaluable.
 int getStorageClass()
          getStorageClass Get the storage class of the variable.
 int getVisibility()
          getVisibility Get the visibility attribute of the variable.
 boolean isSizeEvaluable()
           
 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)
          setStorageClass Set the storage class of the variable.
 void setVisibility(int pVisibility)
          setVisibility Set the visibility attribute of the variable.
 
インタフェース 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, toStringDetail, 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
 

フィールドの詳細

VAR_STATIC

public static final int VAR_STATIC
関連項目:
定数フィールド値

VAR_AUTO

public static final int VAR_AUTO
関連項目:
定数フィールド値

VAR_REGISTER

public static final int VAR_REGISTER
関連項目:
定数フィールド値

STORAGECLASS

public static final java.lang.String[] STORAGECLASS
メソッドの詳細

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.

戻り値:
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.

パラメータ:
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 isSizeEvaluable Get the size of this variable in byte if it is evaluable. "this" may be any variable. getSize rerturn the size of the type of this variable if it is evaluable. If it is not evaluable, return 0. isSizeEvaluable return true if the size of the type of this variable is evaluable, false otherwise.


isSizeEvaluable

public boolean isSizeEvaluable()

getDimension

public int getDimension()
getDimension Get the dimension of this variable. "this" is a variable.

戻り値:
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. getInitialValue return initial value expression subtree if initial value is given, return null if no initial value is specified.


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.

パラメータ:
pInitialValue - initial value expression subtree. setInitialValue Set initial value expression for this variable.

getStorageClass

public int getStorageClass()
getStorageClass Get the storage class of the variable. "this" may be any variable. getStorageClass; return the storage class of the variable (VAR_STATIC, VAR_AUTO, VAR_REGISTER)

戻り値:
the storage class.

setStorageClass

public void setStorageClass(int pStorageClass)
setStorageClass Set the storage class of the variable. "this" may be any variable.

パラメータ:
pStorageClass - storage class to be set to this variable (VAR_STATIC, VAR_AUTO, VAR_REGISTER)

getVisibility

public int getVisibility()
getVisibility Get the visibility attribute of the variable. (SYM_EXTERN, SYM_PUBLIC, SYM_PROTECTED, SYM_PRIVATE, SYM_COMPILE_UNIT)

戻り値:
the visibility attribute.

setVisibility

public void setVisibility(int pVisibility)
setVisibility Set the visibility attribute of the variable. "this" may be any variable.

パラメータ:
pVisibility - visibility attribute to be set to this variable (SYM_EXTERN, SYM_PUBLIC, SYM_PROTECTED, SYM_PRIVATE, SYM_COMPILE_UNIT)

evaluateAsObject

public java.lang.Object evaluateAsObject()
Available flags Sym.FLAG_SIZEOF_TAKEN Sym.FLAG_ADDRESS_TAKEN Sym.FLAG_POINTER_OPERATION Sym.FLAG_AREG_ALLOCATED Sym.FLAG_DERIVED_SYM Sym.FLAG_GENERATED_SYM