Class SimpleLocalDefs

  • All Implemented Interfaces:
    LocalDefs

    public class SimpleLocalDefs
    extends Object
    implements LocalDefs
    Analysis that provides an implementation of the LocalDefs interface.
    • Method Detail

      • restoreNumbers

        protected void restoreNumbers​(Local[] locals,
                                      int[] oldNumbers)
      • assignNumbers

        protected int[] assignNumbers​(Local[] locals)
      • getLocalNumber

        protected int getLocalNumber​(Local l)
      • getDefsOfAt

        public List<Unit> getDefsOfAt​(Local l,
                                      Unit s)
        Description copied from interface: LocalDefs
        Returns the definition sites for a Local at a certain point (Unit) in a method. You can assume this method never returns null.
        Specified by:
        getDefsOfAt in interface LocalDefs
        Parameters:
        l - the Local in question.
        s - a unit that specifies the method context (location) to query for the definitions of the Local.
        Returns:
        a list of Units where the local is defined in the current method context. If there are no uses an empty list will returned.
      • getDefsOf

        public List<Unit> getDefsOf​(Local l)
        Description copied from interface: LocalDefs
        Returns the definition sites for a Local merged over all points in a method. You can assume this method never returns null.
        Specified by:
        getDefsOf in interface LocalDefs
        Parameters:
        l - the Local in question.
        Returns:
        a list of Units where the local is defined in the current method context. If there are no uses an empty list will returned.