coins.alias
Class MyExpIdAssigner

java.lang.Object
  extended bycoins.ir.hir.HirVisitorModel2
      extended bycoins.alias.MyExpIdAssigner
All Implemented Interfaces:
HirVisitor

class MyExpIdAssigner
extends HirVisitorModel2

Assigns MyExpIds to relevant nodes in a subprogram. Nodes MyExpIds are assigned to are

These (except for AssignStmt nodes) are the nodes that can be considered to have values. (Nodes with aggregate type are considered to have arrays of values.) Operands of the ADDRESS nodes are also included, although their values are irrelevant.


Field Summary
(package private)  AliasFactory fFactory
          Factory object used to create objects.
(package private)  MyExpId[] fMyExpIdTable
          Table of MyExpId objects whose index is the HIR node index.
(package private)  SubpDefinition fSubpDef
          SubpDefinition instance nodes contained in which to assign MyExpIds.
 
Fields inherited from class coins.ir.hir.HirVisitorModel2
fDbgLevel, hirRoot, ioRoot, symRoot
 
Constructor Summary
(package private) MyExpIdAssigner(SubpDefinition pSubpDef, HirRoot pHirRoot)
          Creates a new instance of MyExpIdAssigner
 
Method Summary
(package private)  MyExpId[] assign()
          Performs the assignment for all the nodes contained in fSubpDef.
 void atAssignStmt(AssignStmt pStmt)
          Assigns MyExpId to the specified AssignStmt.
 void atExp(Exp pExp)
          Assigns MyExpId to the specified Exp.
 void atFunctionExp(FunctionExp pExp)
          Assigns MyExpId to the specified FunctionExp.
 void atPhiExp(PhiExp pExp)
          Assigns MyExpId to the specified PhiExp.
 void atPointedExp(PointedExp pExp)
          Assigns MyExpId to the specified PointedExp.
 void atQualifiedExp(QualifiedExp pExp)
          Assigns MyExpId to the specified QualifiedExp.
 void atSubscriptedExp(SubscriptedExp pExp)
          Assigns MyExpId to the specified SubscriptedExp.
 void atVarNode(VarNode pVarNode)
          Assigns MyExpId to the specified VarNode.
 
Methods inherited from class coins.ir.hir.HirVisitorModel2
atAsmStmt, atBlockStmt, atConstNode, atElemNode, atExpStmt, atForStmt, atHirList, atHirSeq, atIfStmt, atIndexedLoopStmt, atInfNode, atInfStmt, atIrList, atJumpStmt, atLabelDef, atLabeledStmt, atLabelNode, atLoopStmt, atNullNode, 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

fMyExpIdTable

MyExpId[] fMyExpIdTable
Table of MyExpId objects whose index is the HIR node index.


fFactory

final AliasFactory fFactory
Factory object used to create objects.


fSubpDef

SubpDefinition fSubpDef
SubpDefinition instance nodes contained in which to assign MyExpIds.

Constructor Detail

MyExpIdAssigner

MyExpIdAssigner(SubpDefinition pSubpDef,
                HirRoot pHirRoot)
Creates a new instance of MyExpIdAssigner

Parameters:
pSubpDef - SubpDefinition instance nodes contained in which to assign MyExpIds.
pHirRoot - HirRoot object shared by every module in the program.
Method Detail

assign

MyExpId[] assign()
Performs the assignment for all the nodes contained in fSubpDef.

Returns:
fMyExpIdTable, the table of assigned MyExpIds where indexes are HIR node indexes.

atVarNode

public void atVarNode(VarNode pVarNode)
Assigns MyExpId to the specified VarNode.

Specified by:
atVarNode in interface HirVisitor
Overrides:
atVarNode in class HirVisitorModel2
Parameters:
pVarNode - VarNode to assign MyExpId to.

atExp

public void atExp(Exp pExp)
Assigns MyExpId to the specified Exp.

Specified by:
atExp in interface HirVisitor
Overrides:
atExp in class HirVisitorModel2
Parameters:
pExp - Exp to assign MyExpId to.

atSubscriptedExp

public void atSubscriptedExp(SubscriptedExp pExp)
Assigns MyExpId to the specified SubscriptedExp.

Specified by:
atSubscriptedExp in interface HirVisitor
Overrides:
atSubscriptedExp in class HirVisitorModel2
Parameters:
pExp - SubscriptedExp to assign MyExpId to.

atQualifiedExp

public void atQualifiedExp(QualifiedExp pExp)
Assigns MyExpId to the specified QualifiedExp.

Specified by:
atQualifiedExp in interface HirVisitor
Overrides:
atQualifiedExp in class HirVisitorModel2
Parameters:
pExp - QualifiedExp to assign MyExpId to.

atPointedExp

public void atPointedExp(PointedExp pExp)
Assigns MyExpId to the specified PointedExp.

Specified by:
atPointedExp in interface HirVisitor
Overrides:
atPointedExp in class HirVisitorModel2
Parameters:
pExp - PointedExp to assign MyExpId to.

atFunctionExp

public void atFunctionExp(FunctionExp pExp)
Assigns MyExpId to the specified FunctionExp.

Specified by:
atFunctionExp in interface HirVisitor
Overrides:
atFunctionExp in class HirVisitorModel2
Parameters:
pExp - FunctionExp to assign MyExpId to.

atAssignStmt

public void atAssignStmt(AssignStmt pStmt)
Assigns MyExpId to the specified AssignStmt.

Specified by:
atAssignStmt in interface HirVisitor
Overrides:
atAssignStmt in class HirVisitorModel2
Parameters:
pStmt - AssignStmt to assign MyExpId to.

atPhiExp

public void atPhiExp(PhiExp pExp)
Assigns MyExpId to the specified PhiExp.

Specified by:
atPhiExp in interface HirVisitor
Overrides:
atPhiExp in class HirVisitorModel2
Parameters:
pExp - PhiExp to assign MyExpId to.