|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.alias.Tag
A Tag corresponds to some area in memory. It is
assciated with the set of lvalue expressions that have
the same form. So this could have extended ExpId,
but instead has a field that links to the ExpId
(MyExpId) it represents.
Tags form a tree structure in which parent nodes
represent areas in memory that includes the areas
child nodes represent. This relationship is used
to assign bits to each Tag. It also
makes it possible, via promote() method,
to accurately handle the situation where some area
obsuring operations, such as pointer arithmetic,
hss been performed.
| Field Summary | |
(package private) static int |
ANCHORED
Flag number for anchoredness. |
(package private) int |
fBitPos
Bit position this Tag correponds to in the TagVectors to be created. |
(package private) java.util.List |
fChildren
List of child Tags of this Tag. |
(package private) boolean |
fIsUnique
Specifies if this Tag represents a unique area in memory. |
(package private) int |
fKind
Kind of this Tag. |
(package private) MyExpId |
fMyExpId
MyExpId object this Tag is associated with. |
(package private) Tag |
fParent
Parent Tag of this Tag. |
(package private) int |
fStorageClass
Storage class of this Tag. |
(package private) TagVector |
fTagVect
TagVector object that represents all
the objects this Tag may represnt. |
(package private) Type |
fType
Type of the object this Tag represents. |
(package private) Tag |
fUnionAncestor
|
(package private) static int |
HAS_UNION_ANCESTOR
Flag number for whether being a union descendant. |
(package private) static int |
KIND_ATOMIC
The kind for the Tags that represent atomic (scalar) type objects. |
(package private) static int |
KIND_STRUCT
The kind for the Tags that represent struct type objects. |
(package private) static int |
KIND_UNION
The kind for the Tags that represent union type objects. |
(package private) static int |
KIND_UNKNOWN
The kind for the Tag whose type is unknown, |
(package private) static int |
KIND_VECTOR
The kind for the Tags represent vector type objects. |
(package private) static int |
STO_CUR_FRAME
Current frmae storage class, the storage class that corresponds to automatic variables declared within the current subprogram. |
(package private) static int |
STO_HEAP
Heap storage class, the storage class that corresponds to areas allocated by the current subprogram. |
(package private) static int |
STO_OTHER
Other storage class, the storage class that does not fall into current frame or static or heap. |
(package private) static int |
STO_ROOT
Root storage class, the storage class that corresponds to the whole memory space. |
(package private) static int |
STO_STATIC
Static storage class, the storage class that corresponds to static Vars. |
| Constructor Summary | |
(package private) |
Tag(HIR pmallocInvocationNode)
Creates a new instance of Tag that is associated with an area allocated by a single malloc
invocation. |
(package private) |
Tag(int pKind)
Creates a new instance of Tag that corresponds to the STO_OTHER storage class. |
(package private) |
Tag(MyExpId pMyExpId,
boolean pIsAnchored,
int pKind,
int pStorageClass)
Creates a new instance of Tag that is associated with a MyExpId object. |
| Method Summary | |
(package private) boolean |
getFlag(int pFlag)
|
(package private) void |
inheritAttributes()
Inherits attributes from the parent Tag. |
(package private) boolean |
isAnchored()
Returns true if this Tag has a corresponding
anchor. |
(package private) Tag |
promote()
Returns the Tag that covers the area that the result of the pointer operation that has a pointer expression that points to one of the areas that this Tag represents as one of its operands can point to. |
(package private) void |
setFlag(int pFlag,
boolean pYesNo)
|
java.lang.String |
toString()
Returns the String representation of this Tag. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
MyExpId fMyExpId
MyExpId object this Tag is associated with.
int fKind
int fStorageClass
Type fType
Type of the object this Tag represents.
Tags that represent
int fBitPos
TagVectors to be created. -1
if there is no such corresponding bit.
boolean fIsUnique
Var or constant-subscript element of an array Var or malloced area is unique.
Tag fParent
null.
See #fChildren
See #isAnchored
java.util.List fChildren
List of child Tags of this Tag.
A child Tag of a Tag corresponds to an area in memory
that is directly enclosed by the area the original
Tag represnts. As such, the original Tag must represent
a relatively limited area in memory (isAnchored), or
fChildren is empyt.
See #fParent
See #isAnchored
Tag fUnionAncestor
static final int KIND_VECTOR
static final int KIND_STRUCT
static final int KIND_UNION
static final int KIND_ATOMIC
static final int KIND_UNKNOWN
static final int STO_ROOT
static final int STO_CUR_FRAME
static final int STO_STATIC
Vars.
static final int STO_HEAP
static final int STO_OTHER
Vars from subprograms calling
the current subprogram, global Vars that
do not appear in the current subprogram, and areas
allocated by the subprograms calling the current subprogram.
TagVector fTagVect
TagVector object that represents all
the objects this Tag may represnt. This will change
as the analysis goes on.
static final int ANCHORED
static final int HAS_UNION_ANCESTOR
| Constructor Detail |
Tag(MyExpId pMyExpId,
boolean pIsAnchored,
int pKind,
int pStorageClass)
MyExpId object.
pMyExpId - MyExpId object this Tag
is associated with.pIsAnchored - Is this Tag associated with
a single named Var?pKind - kind of this Tag.pStorageClass - storage class of this Tag.Tag(HIR pmallocInvocationNode)
malloc
invocation. malloc invocation within
loops are not considered distinct (there are
considered a single invocation).
pmallocInvocationNode - FunctionExp
node that is an malloc invocation node.Tag(int pKind)
pKind - the kind of Tag to be created.| Method Detail |
void inheritAttributes()
boolean isAnchored()
true if this Tag has a corresponding
anchor. A Tag represents an area in memory,
but which area it represents may not be accurately
determined at compile time. Tags which are anchored
can only represent areas in memory that are inside
the area the anchor Tag represents.
Tag promote()
boolean getFlag(int pFlag)
void setFlag(int pFlag,
boolean pYesNo)
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||