soot.shimple.toolkits.scalar
Class ShimpleLocalUses
java.lang.Object
|
+--soot.shimple.toolkits.scalar.ShimpleLocalUses
- public class ShimpleLocalUses
- extends java.lang.Object
- implements LocalUses
This class implements the LocalUses interface for Shimple.
ShimpleLocalUses can be used in conjunction with SimpleLocalDefs to
provide Definition/Use and Use/Definition chains in SSA.
In addition to the interface required by LocalUses,
ShimpleLocalUses also provides a method for obtaining the list of
uses given only the Local. Furthermore, unlike SimpleLocalUses, a
LocalDefs object is not required when constructing
ShimpleLocalUses.
- See Also:
ShimpleLocalDefs
,
SimpleLocalDefs
,
SimpleLocalUses
Method Summary |
java.util.List |
getUsesOf(Local local)
Returns all the uses of the given Local as a list of
UnitValueBoxPairs, each containing a Unit that uses the local
and the corresponding ValueBox containing the Local. |
java.util.List |
getUsesOf(Unit unit)
If a Local is defined in the Unit, returns all the uses of that
Local as a list of UnitValueBoxPairs, each containing a Unit
that uses the local and the corresponding ValueBox containing
the Local. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
localToUses
protected java.util.Map localToUses
ShimpleLocalUses
public ShimpleLocalUses(ShimpleBody sb)
- Build a LocalUses interface from a ShimpleBody. Proper SSA
form is required, otherwise correct behaviour is not
guaranteed.
getUsesOf
public java.util.List getUsesOf(Local local)
- Returns all the uses of the given Local as a list of
UnitValueBoxPairs, each containing a Unit that uses the local
and the corresponding ValueBox containing the Local.
This method is currently not required by the LocalUses
interface.
getUsesOf
public java.util.List getUsesOf(Unit unit)
- If a Local is defined in the Unit, returns all the uses of that
Local as a list of UnitValueBoxPairs, each containing a Unit
that uses the local and the corresponding ValueBox containing
the Local.
- Specified by:
- getUsesOf in interface LocalUses
- Tags copied from interface: LocalUses
- Parameters:
s
- the unit we wish to query for the use of the Local
it defines.- Returns:
- a list of the Local's uses.