|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.ir.hir.HirVisitorModel2
coins.alias.TagTreeBuilder
Builds tag tree and assigns tags to HIR nodes.
| Field Summary | |
(package private) java.util.Map |
fHIRTomallocTag
Map from malloc invocation HIR nodes to
corresponding Tags. |
(package private) java.util.List |
fParentlessTags
Tags corresponding to each named variable and allocated area and unknown external area. |
(package private) int |
fTagBitCount
Total number of Tags that have a bit position assigned in the TagVector. |
| Fields inherited from class coins.ir.hir.HirVisitorModel2 |
fDbgLevel, hirRoot, ioRoot, symRoot |
| Constructor Summary | |
(package private) |
TagTreeBuilder(SubpDefinition pSubpDef,
MyExpId[] pMyExpIds,
boolean pIsOptimistic,
HirRoot pHirRoot)
Creates a new instance of TagTreeBuilder |
| Method Summary | |
void |
atExp(Exp pExp)
Visits the children of the specified argument, creates a Tag for the MyExpId attached to
the specified argument if it is lvalue and not yet done,
and registers the node-Tag correspondence into a global map. |
void |
atFunctionExp(FunctionExp pExp)
Visits the children of the specified argument, and, if the specified argument is the C malloc library function call node, creates a Tag for the area allocated by the call and registers the node-Tag correspondence into a global map. |
void |
atPointedExp(PointedExp pExp)
Visits the children of the specified argument, creates a Tag for the MyExpId attached to the
specified argument if it is not yet done, and registers
the node-Tag correspondence into a global map. |
void |
atQualifiedExp(QualifiedExp pExp)
Visits the children of the specified argument, and if the specified argument is lvalue, creates a Tag for the MyExpId attached to the specified argument
if it is not yet done, and registers the node-Tag
correspondence into a global map. |
void |
atSubscriptedExp(SubscriptedExp pExp)
Visits the children of the specified argument, and if the specified argument is not lvalue, creates a Tag for the MyExpId attached to
the specified argument if it is not yet done,
and registers the node-Tag correspondence into a global map. |
void |
atVarNode(VarNode pVarNode)
Creates a Tag for the Var attached to
the specified argument if it is not yet done,
and registers the node-Tag correspondence into
a global map. |
(package private) java.util.Map |
process()
Builds the Tag tree. |
| Methods inherited from class coins.ir.hir.HirVisitorModel2 |
atAsmStmt, atAssignStmt, atBlockStmt, atConstNode, atElemNode, atExpStmt, atForStmt, atHirList, atHirSeq, atIfStmt, atIndexedLoopStmt, atInfNode, atInfStmt, atIrList, atJumpStmt, atLabelDef, atLabeledStmt, atLabelNode, atLoopStmt, atNullNode, atPhiExp, atProgram, atRepeatStmt, atReturnStmt, atSubpDefinition, atSubpNode, atSwitchStmt, atSymNode, atTypeNode, atUntilStmt, atWhileStmt, visit, visitChildren |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
int fTagBitCount
java.util.Map fHIRTomallocTag
Map from malloc invocation HIR nodes to
corresponding Tags.
java.util.List fParentlessTags
List.
| Constructor Detail |
TagTreeBuilder(SubpDefinition pSubpDef,
MyExpId[] pMyExpIds,
boolean pIsOptimistic,
HirRoot pHirRoot)
pSubpDef - the SubpDefinition object
this module is responsible for.pMyExpIds - the array of MyExpId
objects, with HIR node's index as its index.
This serves as the map from HIR nodes to
MyExpId objects.pHirRoot - the HirRoot object
shared by every module in the program.| Method Detail |
java.util.Map process()
Map from HIR
nodes to such Tags.
Map from HIR nodes to Tags.public void atVarNode(VarNode pVarNode)
Var attached to
the specified argument if it is not yet done,
and registers the node-Tag correspondence into
a global map.
atVarNode in interface HirVisitoratVarNode in class HirVisitorModel2pVarNode - the VarNode the
Var attached to which is going to
be assigned a Tag.public void atSubscriptedExp(SubscriptedExp pExp)
MyExpId attached to
the specified argument if it is not yet done,
and registers the node-Tag correspondence into a global map.
atSubscriptedExp in interface HirVisitoratSubscriptedExp in class HirVisitorModel2pExp - the SubscriptedExp
the MyExpId attached to which is going
to be assigned a Tag.public void atQualifiedExp(QualifiedExp pExp)
MyExpId attached to the specified argument
if it is not yet done, and registers the node-Tag
correspondence into a global map.
atQualifiedExp in interface HirVisitoratQualifiedExp in class HirVisitorModel2pExp - the QualifiedExp the
MyExpId attached to which is going
to be assigned a Tag.public void atPointedExp(PointedExp pExp)
MyExpId attached to the
specified argument if it is not yet done, and registers
the node-Tag correspondence into a global map.
atPointedExp in interface HirVisitoratPointedExp in class HirVisitorModel2pExp - the PointedExp the
MyExpId attached to which is going to be
assigned a Tag.public void atExp(Exp pExp)
MyExpId attached to
the specified argument if it is lvalue and not yet done,
and registers the node-Tag correspondence into a global map.
atExp in interface HirVisitoratExp in class HirVisitorModel2pExp - the Exp the MyExpId
attached to which is going to be assigned a Tag.public void atFunctionExp(FunctionExp pExp)
atFunctionExp in interface HirVisitoratFunctionExp in class HirVisitorModel2pExp - the FunctionExp the area
allocated by which is going to be assigned a Tag.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||