public class ScopeMappingInstanceKeys.ScopeMappingInstanceKey
extends java.lang.Object
implements com.ibm.wala.ipa.callgraph.propagation.InstanceKey
InstanceKey carrying information about which CGNodes represent lexical
parents of the allocating CGNode.
The fact that we discover at most one CGNode per lexical parent relies on the
following property: in a call graph, the contexts used for a nested function can be finer than
those used for the containing function, but _not_ coarser. This ensures that there is at most
one CGNode corresponding to a lexical parent (e.g., we don't get two clones of function f1()
invoking a single CGNode representing nested function f2())
Note that it is possible to not find a CGNode corresponding to some lexical parent;
this occurs when a deeply nested function is returned before being invoked, so some lexical
parent is no longer on the call stack when the function is allocated. See test case nested.js.
| Constructor and Description |
|---|
ScopeMappingInstanceKey(com.ibm.wala.ipa.callgraph.CGNode creator,
com.ibm.wala.ipa.callgraph.propagation.InstanceKey base) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
com.ibm.wala.ipa.callgraph.propagation.InstanceKey |
getBase() |
com.ibm.wala.classLoader.IClass |
getConcreteType() |
java.util.Iterator<com.ibm.wala.util.collections.Pair<com.ibm.wala.ipa.callgraph.CGNode,com.ibm.wala.classLoader.NewSiteReference>> |
getCreationSites(com.ibm.wala.ipa.callgraph.CallGraph CG) |
com.ibm.wala.ipa.callgraph.CGNode |
getCreator() |
java.util.Iterator<com.ibm.wala.ipa.callgraph.CGNode> |
getFunargNodes(com.ibm.wala.util.collections.Pair<java.lang.String,java.lang.String> name)
get the CGNode representing the lexical parent of
creator with name definer |
int |
hashCode() |
java.lang.String |
toString() |
public ScopeMappingInstanceKey(com.ibm.wala.ipa.callgraph.CGNode creator,
com.ibm.wala.ipa.callgraph.propagation.InstanceKey base)
public com.ibm.wala.classLoader.IClass getConcreteType()
getConcreteType in interface com.ibm.wala.ipa.callgraph.propagation.InstanceKeypublic java.util.Iterator<com.ibm.wala.ipa.callgraph.CGNode> getFunargNodes(com.ibm.wala.util.collections.Pair<java.lang.String,java.lang.String> name)
creator with name definerpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic com.ibm.wala.ipa.callgraph.propagation.InstanceKey getBase()
public com.ibm.wala.ipa.callgraph.CGNode getCreator()
public java.util.Iterator<com.ibm.wala.util.collections.Pair<com.ibm.wala.ipa.callgraph.CGNode,com.ibm.wala.classLoader.NewSiteReference>> getCreationSites(com.ibm.wala.ipa.callgraph.CallGraph CG)
getCreationSites in interface com.ibm.wala.ipa.callgraph.propagation.InstanceKey