|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.PointerAnalysis.NodeRepository
public class NodeRepository
Field Summary | |
---|---|
static PANode |
LOST_SUMMARY
|
static PANode |
NULL_NODE
|
Constructor Summary | |
---|---|
NodeRepository(Linker linker)
Creates a NodeRepository . |
Method Summary | |
---|---|
void |
addParamNodes(MetaMethod mmethod,
int param_number)
Creates all the parameter nodes associated with mmethod . |
static HClass |
getAllocatedType(HCodeElement hce)
|
PANode[] |
getAllParams(MetaMethod mmethod)
Returns all the parameter nodes associated with the formal parameters of mmethod . |
PANode |
getCodeNode(HCodeElement hce,
int type)
|
PANode |
getCodeNode(HCodeElement hce,
int type,
boolean make)
|
PANode |
getCodeNode(HCodeElement hce,
int type,
GenType[] gts)
Returns a code node: a node associated with the instruction hce : a load node
(associated with a GET quad), a return node (associated
with a CALL ) or an inside node (thread or not) associated
with a NEW ). |
PANode |
getCodeNode(HCodeElement hce,
int type,
GenType[] gts,
boolean make)
Returns a code node: a node associated with an instruction. |
PANode |
getConstNode(Object value)
Returns the node that models the constant object value . |
HClass |
getInsideNodeType(PANode node)
Gets the type of an inside node. |
PANode |
getLoadNodeSpecial(HCodeElement hce,
String f)
Special function for load instructions that read multiple fields in the same time (the motivating example is that of "clone()") For such an instruction, a load node is generated for each field that is read ( f in the parameter list). |
PANode |
getParamNode(MetaMethod mmethod,
int count)
Returns the parameter node associated with the count th
formal parameter of mmethod . |
PANode |
getStaticNode(String class_name)
Returns the static node associated with the class class_name . |
HCodeElement |
node2Code(PANode node)
Returns the instruction that created node . |
void |
print_stats()
Prints some statistics. |
void |
show_specializations()
Nice looking info for debug purposes. |
String |
toString()
Pretty-printer for debug purposes. |
void |
updateNode2Code(PANode node,
HCodeElement hce)
Modify the node2code mapping such that now node is associated with hce. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PANode NULL_NODE
public static final PANode LOST_SUMMARY
Constructor Detail |
---|
public NodeRepository(Linker linker)
NodeRepository
.
Method Detail |
---|
public final PANode getConstNode(Object value)
value
. Currently, all constant objects are
modelled by a single node.
public final PANode getStaticNode(String class_name)
class_name
. The node is automatically created if it
doesn't exist yet. class_name
MUST be the full
(and hence unique) name of the class
public final void addParamNodes(MetaMethod mmethod, int param_number)
mmethod
.
param_number
must contain the number of formal
parameters of the meta-method.
public final PANode getParamNode(MetaMethod mmethod, int count)
count
th
formal parameter of mmethod
. The parameter nodes for
mmethod
should be created in advance, using
addParamNodes
.
public final PANode[] getAllParams(MetaMethod mmethod)
mmethod
. The parameter nodes for
mmethod
should be
created in advance, using addParamNodes
.
public final PANode getLoadNodeSpecial(HCodeElement hce, String f)
f
in the parameter list).
public final PANode getCodeNode(HCodeElement hce, int type)
public final PANode getCodeNode(HCodeElement hce, int type, boolean make)
public final PANode getCodeNode(HCodeElement hce, int type, GenType[] gts)
hce
: a load node
(associated with a GET
quad), a return node (associated
with a CALL
) or an inside node (thread or not) associated
with a NEW
). The node is automatically created if it
doesn't exist yet. The type of the node should be passed in the
type
argument.
public final PANode getCodeNode(HCodeElement hce, int type, GenType[] gts, boolean make)
make
controls the generation of
such a node in case it doesn't exist yet.
public final HCodeElement node2Code(PANode node)
node
.
public final HClass getInsideNodeType(PANode node)
public static HClass getAllocatedType(HCodeElement hce)
public final void updateNode2Code(PANode node, HCodeElement hce)
public final String toString()
toString
in class Object
public void print_stats()
public void show_specializations()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |