public class SmartLocalDefsPool extends Object
SmartLocalDefs instances. This is useful, as these analyses are expensive to
compute. A SmartLocalDefs instance requires a UnitGraph (usually a ExceptionalUnitGraph), and
creating these repeatedly, and applying the SmartLocalDefs analysis repeatedly costs time. Therefore in this class
we pool these instances in cases in which the respective body is still the same.| Modifier and Type | Field and Description |
|---|---|
protected Map<Body,Pair<Long,SmartLocalDefs>> |
pool |
| Constructor and Description |
|---|
SmartLocalDefsPool(Singletons.Global g) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
SmartLocalDefs |
getSmartLocalDefsFor(Body b)
This method returns a fresh instance of a
SmartLocalDefs analysis, based on a freshly created
ExceptionalUnitGraph for b, with standard parameters. |
void |
invalidate(Body b) |
static SmartLocalDefsPool |
v() |
protected Map<Body,Pair<Long,SmartLocalDefs>> pool
public SmartLocalDefsPool(Singletons.Global g)
public SmartLocalDefs getSmartLocalDefsFor(Body b)
SmartLocalDefs analysis, based on a freshly created
ExceptionalUnitGraph for 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.Body.getModificationCount()public void clear()
public static SmartLocalDefsPool v()
public void invalidate(Body b)
Copyright © 2020 Soot OSS. All rights reserved.