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
Fields inherited from interface edu.umd.cs.findbugs.ba.vna.ValueNumberAnalysisFeatures
REDUNDANT_LOAD_ELIMINATION, RLE_DEBUG
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAvailableLoad
(AvailableLoad availableLoad, ValueNumber[] value) Add an available load.void
copyFrom
(Frame<ValueNumber> other) Make this Frame exactly the same as the one given as a parameter.boolean
fromMatchingFields
(ValueNumber v1, ValueNumber v2) boolean
fromMatchingLoads
(ValueNumber v1, ValueNumber v2) boolean
fuzzyMatch
(ValueNumber v1, ValueNumber v2) getAvailableLoad
(AvailableLoad availableLoad) Look for an available load.boolean
boolean
haveMatchingFlags
(ValueNumber v1, ValueNumber v2) void
Kill all loads.void
killAllLoads
(boolean primitiveOnly) void
void
Kill all loads.void
killLoadsOf
(Set<XField> fieldsToKill) void
killLoadsOfField
(XField field) Kill all loads of given field.void
killLoadsWithSimilarName
(String className, String methodName) boolean
sameAs
(Frame<ValueNumber> other) Return true if this stack frame is the same as the one given as a parameter.toString()
Convert to string.boolean
veryFuzzyMatch
(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:Frame
Make this Frame exactly the same as the one given as a parameter.- Overrides:
copyFrom
in classFrame<ValueNumber>
- Parameters:
other
- the Frame to make this object the same as
-
toString
Description copied from class:Frame
Convert to string.- Overrides:
toString
in classFrame<ValueNumber>
-
fuzzyMatch
-
veryFuzzyMatch
-
fromMatchingLoads
-
fromMatchingFields
-
haveMatchingFlags
- Returns:
- true if v1 and v2 have a flag in common
-
valueNumbersForLoads
-
sameAs
Description copied from class:Frame
Return true if this stack frame is the same as the one given as a parameter.- Overrides:
sameAs
in classFrame<ValueNumber>
- Parameters:
other
- the other Frame- Returns:
- true if the frames are the same, false otherwise
-
hasAvailableLoads
public boolean hasAvailableLoads()
-