Class ValueNumberFrame

java.lang.Object
edu.umd.cs.findbugs.ba.Frame<ValueNumber>
edu.umd.cs.findbugs.ba.vna.ValueNumberFrame
All Implemented Interfaces:
ValueNumberAnalysisFeatures

public class ValueNumberFrame extends Frame<ValueNumber> implements ValueNumberAnalysisFeatures
A dataflow value representing a Java stack frame with value number information.
Author:
David Hovemeyer
See Also:
  • Field Details

    • phiNodeForLoads

      public boolean phiNodeForLoads
  • Constructor Details

    • ValueNumberFrame

      public ValueNumberFrame(int numLocals)
  • Method Details

    • availableLoadMapAsString

      public String availableLoadMapAsString()
    • getLoad

      @CheckForNull public AvailableLoad getLoad(ValueNumber v)
    • getAvailableLoad

      public ValueNumber[] getAvailableLoad(AvailableLoad availableLoad)
      Look for an available load.
      Parameters:
      availableLoad - the AvailableLoad (reference and field)
      Returns:
      the value(s) available, or null if no matching entry is found
    • addAvailableLoad

      public void addAvailableLoad(AvailableLoad availableLoad, @Nonnull ValueNumber[] value)
      Add an available load.
      Parameters:
      availableLoad - the AvailableLoad (reference and field)
      value - the value(s) loaded
    • killLoadsOfField

      public void killLoadsOfField(XField field)
      Kill all loads of given field.
      Parameters:
      field - the field
    • killAllLoads

      public void killAllLoads()
      Kill all loads. This conservatively handles method calls where we don't really know what fields might be assigned.
    • killAllLoads

      public void killAllLoads(boolean primitiveOnly)
    • killAllLoadsExceptFor

      public void killAllLoadsExceptFor(@CheckForNull ValueNumber v)
    • killAllLoadsOf

      public void killAllLoadsOf(@CheckForNull ValueNumber v)
      Kill all loads. This conservatively handles method calls where we don't really know what fields might be assigned.
    • killLoadsOf

      public void killLoadsOf(Set<XField> fieldsToKill)
    • killLoadsWithSimilarName

      public void killLoadsWithSimilarName(String className, String methodName)
    • copyFrom

      public void copyFrom(Frame<ValueNumber> other)
      Description copied from class: Frame
      Make this Frame exactly the same as the one given as a parameter.
      Overrides:
      copyFrom in class Frame<ValueNumber>
      Parameters:
      other - the Frame to make this object the same as
    • toString

      public String toString()
      Description copied from class: Frame
      Convert to string.
      Overrides:
      toString in class Frame<ValueNumber>
    • fuzzyMatch

      public boolean fuzzyMatch(ValueNumber v1, ValueNumber v2)
    • veryFuzzyMatch

      public boolean veryFuzzyMatch(ValueNumber v1, ValueNumber v2)
    • fromMatchingLoads

      public boolean fromMatchingLoads(ValueNumber v1, ValueNumber v2)
    • fromMatchingFields

      public boolean fromMatchingFields(ValueNumber v1, ValueNumber v2)
    • haveMatchingFlags

      public boolean haveMatchingFlags(ValueNumber v1, ValueNumber v2)
      Returns:
      true if v1 and v2 have a flag in common
    • valueNumbersForLoads

      public Collection<ValueNumber> valueNumbersForLoads()
    • sameAs

      public boolean sameAs(Frame<ValueNumber> other)
      Description copied from class: Frame
      Return true if this stack frame is the same as the one given as a parameter.
      Overrides:
      sameAs in class Frame<ValueNumber>
      Parameters:
      other - the other Frame
      Returns:
      true if the frames are the same, false otherwise
    • hasAvailableLoads

      public boolean hasAvailableLoads()