Package soot.toolkits.scalar
Class SimpleLocalDefs
- java.lang.Object
-
- soot.toolkits.scalar.SimpleLocalDefs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSimpleLocalDefs.FlowAnalysisModeThe different modes in which the flow analysis can runclassSimpleLocalDefs.FlowAssignmentstatic classSimpleLocalDefs.StaticSingleAssignment
-
Constructor Summary
Constructors Constructor Description SimpleLocalDefs(UnitGraph graph)SimpleLocalDefs(UnitGraph graph, SimpleLocalDefs.FlowAnalysisMode mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int[]assignNumbers(Local[] locals)List<Unit>getDefsOf(Local l)Returns the definition sites for a Local merged over all points in a method.List<Unit>getDefsOfAt(Local l, Unit s)Returns the definition sites for a Local at a certain point (Unit) in a method.protected intgetLocalNumber(Local l)protected LocalDefsinit(DirectedGraph<Unit> graph, Local[] locals, SimpleLocalDefs.FlowAnalysisMode mode)protected voidrestoreNumbers(Local[] locals, int[] oldNumbers)
-
-
-
Constructor Detail
-
SimpleLocalDefs
public SimpleLocalDefs(UnitGraph graph)
- Parameters:
graph-
-
SimpleLocalDefs
public SimpleLocalDefs(UnitGraph graph, SimpleLocalDefs.FlowAnalysisMode mode)
-
-
Method Detail
-
restoreNumbers
protected void restoreNumbers(Local[] locals, int[] oldNumbers)
-
assignNumbers
protected int[] assignNumbers(Local[] locals)
-
init
protected LocalDefs init(DirectedGraph<Unit> graph, Local[] locals, SimpleLocalDefs.FlowAnalysisMode mode)
-
getLocalNumber
protected int getLocalNumber(Local l)
-
getDefsOfAt
public List<Unit> getDefsOfAt(Local l, Unit s)
Description copied from interface:LocalDefsReturns the definition sites for a Local at a certain point (Unit) in a method. You can assume this method never returnsnull.- Specified by:
getDefsOfAtin interfaceLocalDefs- 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.
-
-