Package edu.umd.cs.findbugs.ba.vna
Class ValueNumberFrame
- All Implemented Interfaces:
ValueNumberAnalysisFeatures
A dataflow value representing a Java stack frame with value number
information.
- Author:
- David Hovemeyer
- See Also:
-
Field Summary
FieldsFields inherited from interface edu.umd.cs.findbugs.ba.vna.ValueNumberAnalysisFeatures
REDUNDANT_LOAD_ELIMINATION, RLE_DEBUG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAvailableLoad(AvailableLoad availableLoad, ValueNumber[] value) Add an available load.voidcopyFrom(Frame<ValueNumber> other) Make this Frame exactly the same as the one given as a parameter.booleanfromMatchingFields(ValueNumber v1, ValueNumber v2) booleanfromMatchingLoads(ValueNumber v1, ValueNumber v2) booleanfuzzyMatch(ValueNumber v1, ValueNumber v2) getAvailableLoad(AvailableLoad availableLoad) Look for an available load.booleanbooleanhaveMatchingFlags(ValueNumber v1, ValueNumber v2) voidKill all loads.voidkillAllLoads(boolean primitiveOnly) voidvoidKill all loads.voidkillLoadsOf(Set<XField> fieldsToKill) voidkillLoadsOfField(XField field) Kill all loads of given field.voidkillLoadsWithSimilarName(String className, String methodName) booleansameAs(Frame<ValueNumber> other) Return true if this stack frame is the same as the one given as a parameter.toString()Convert to string.booleanveryFuzzyMatch(ValueNumber v1, ValueNumber v2) Methods inherited from class edu.umd.cs.findbugs.ba.Frame
allSlots, clearStack, contains, getArgument, getArgument, getArgumentSet, getArgumentSlot, getInstance, getInstanceSlot, getInstanceStackLocation, getLastUpdateTimestamp, getNumArguments, getNumArgumentsIncludingObjectInstance, getNumLocals, getNumSlots, getOperand, getStackDepth, getStackLocation, getStackValue, getTopStackWords, getTopValue, getValue, isBottom, isTop, isValid, popValue, pushValue, setBottom, setLastUpdateTimestamp, setTop, setValid, setValue, valueToString
-
Field Details
-
phiNodeForLoads
public boolean phiNodeForLoads
-
-
Constructor Details
-
ValueNumberFrame
public ValueNumberFrame(int numLocals)
-
-
Method Details
-
availableLoadMapAsString
-
getLoad
-
getAvailableLoad
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
Add an available load.- Parameters:
availableLoad- the AvailableLoad (reference and field)value- the value(s) loaded
-
killLoadsOfField
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
-
killAllLoadsOf
Kill all loads. This conservatively handles method calls where we don't really know what fields might be assigned. -
killLoadsOf
-
killLoadsWithSimilarName
-
copyFrom
Description copied from class:FrameMake this Frame exactly the same as the one given as a parameter.- Overrides:
copyFromin classFrame<ValueNumber>- Parameters:
other- the Frame to make this object the same as
-
toString
Description copied from class:FrameConvert to string.- Overrides:
toStringin classFrame<ValueNumber>
-
fuzzyMatch
-
veryFuzzyMatch
-
fromMatchingLoads
-
fromMatchingFields
-
haveMatchingFlags
- Returns:
- true if v1 and v2 have a flag in common
-
valueNumbersForLoads
-
sameAs
Description copied from class:FrameReturn true if this stack frame is the same as the one given as a parameter.- Overrides:
sameAsin classFrame<ValueNumber>- Parameters:
other- the other Frame- Returns:
- true if the frames are the same, false otherwise
-
hasAvailableLoads
public boolean hasAvailableLoads()
-