Class SimpleLiveLocals

  • All Implemented Interfaces:
    LiveLocals

    public class SimpleLiveLocals
    extends Object
    implements LiveLocals
    Analysis that provides an implementation of the LiveLocals interface.
    • Constructor Detail

      • SimpleLiveLocals

        public SimpleLiveLocals​(DirectedBodyGraph<Unit> graph)
        Computes the analysis given a DirectedBodyGraph computed from a method body. It is recommended that a ExceptionalUnitGraph (or similar) be provided for correct results in the case of exceptional control flow.
        Parameters:
        graph - a graph on which to compute the analysis.
        See Also:
        ExceptionalUnitGraph
    • Method Detail

      • getLiveLocalsAfter

        public List<Local> getLiveLocalsAfter​(Unit s)
        Description copied from interface: LiveLocals
        Returns the list of Locals that are live after the specified Unit.
        Specified by:
        getLiveLocalsAfter in interface LiveLocals
        Parameters:
        s - the Unit that defines this query.
        Returns:
        a list of Locals that are live after the specified unit in the method.
      • getLiveLocalsBefore

        public List<Local> getLiveLocalsBefore​(Unit s)
        Description copied from interface: LiveLocals
        Returns the list of Locals that are live before the specified Unit.
        Specified by:
        getLiveLocalsBefore in interface LiveLocals
        Parameters:
        s - the Unit that defines this query.
        Returns:
        a list of Locals that are live before the specified unit in the method.