Package soot.toolkits.scalar
Class SmartLocalDefsPool
- java.lang.Object
-
- soot.toolkits.scalar.SmartLocalDefsPool
-
public class SmartLocalDefsPool extends Object
This class implements a pool forSmartLocalDefsinstances. This is useful, as these analyses are expensive to compute. ASmartLocalDefsinstance requires aUnitGraph(usually aExceptionalUnitGraph), and creating these repeatedly, and applying theSmartLocalDefsanalysis repeatedly costs time. Therefore in this class we pool these instances in cases in which the respective body is still the same.- Author:
- Eric Bodden
-
-
Constructor Summary
Constructors Constructor Description SmartLocalDefsPool(Singletons.Global g)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()SmartLocalDefsgetSmartLocalDefsFor(Body b)This method returns a fresh instance of aSmartLocalDefsanalysis, based on a freshly createdExceptionalUnitGraphfor b, with standard parameters.voidinvalidate(Body b)static SmartLocalDefsPoolv()
-
-
-
Field Detail
-
pool
protected Map<Body,Pair<Long,SmartLocalDefs>> pool
-
-
Constructor Detail
-
SmartLocalDefsPool
public SmartLocalDefsPool(Singletons.Global g)
-
-
Method Detail
-
getSmartLocalDefsFor
public SmartLocalDefs getSmartLocalDefsFor(Body b)
This method returns a fresh instance of aSmartLocalDefsanalysis, based on a freshly createdExceptionalUnitGraphfor b, with standard parameters. If the body b's modification count has not changed since the last time such an analysis was requested for b, then the previously created analysis is returned instead.- See Also:
Body.getModificationCount()
-
clear
public void clear()
-
v
public static SmartLocalDefsPool v()
-
invalidate
public void invalidate(Body b)
-
-