Class ExplicitCallGraph.ExplicitNode

All Implemented Interfaces:
CGNode, ContextItem, IClassHierarchyDweller, INodeWithNumber
Direct Known Subclasses:
AstCallGraph.AstCGNode, DelegatingExplicitCallGraph.DelegatingCGNode
Enclosing class:
ExplicitCallGraph

public class ExplicitCallGraph.ExplicitNode extends BasicCallGraph.NodeImpl
  • Field Details

    • targets

      protected final SparseVector<Object> targets
      A Mapping from call site program counter (int) -> Object, where Object is a CGNode if we've discovered exactly one target for the site, or an IntSet of node numbers if we've discovered more than one target for the site.
  • Constructor Details

  • Method Details

    • getPossibleTargets

      protected Set<CGNode> getPossibleTargets(CallSiteReference site)
    • getPossibleTargetNumbers

      protected IntSet getPossibleTargetNumbers(CallSiteReference site)
    • getPossibleSites

      protected Iterator<CallSiteReference> getPossibleSites(CGNode to)
    • getNumberOfTargets

      protected int getNumberOfTargets(CallSiteReference site)
    • addTarget

      public boolean addTarget(CallSiteReference site, CGNode tNode)
      Description copied from interface: CGNode
      NOTE: This is for use only by call graph builders, not by any other client of this interface.

      Record that a particular call site might resolve to a call to a particular target node. Returns true if this is a new target

    • addTarget

      protected boolean addTarget(int pc, CGNode tNode)
    • removeTarget

      public void removeTarget(CGNode target)
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in class BasicCallGraph.NodeImpl
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class BasicCallGraph.NodeImpl
    • getAllTargetNumbers

      protected MutableSharedBitVectorIntSet getAllTargetNumbers()
    • clearAllTargets

      public void clearAllTargets()
    • getIR

      public IR getIR()
      Returns:
      the "default" IR for this node used by the governing call graph
    • getDU

      public DefUse getDU()
      Returns:
      DefUse for the "default" IR for this node used by the governing call graph
    • getCallGraph

      public ExplicitCallGraph getCallGraph()
    • iterateCallSites

      public Iterator<CallSiteReference> iterateCallSites()
      Returns:
      an Iterator of the call statements that may execute in a given method for a given context
    • iterateNewSites

      public Iterator<NewSiteReference> iterateNewSites()
      Returns:
      an Iterator of the types that may be allocated by a given method in a given context.
    • getCFG