com.ibm.wala.ssa
Class SSACache

java.lang.Object
  extended by com.ibm.wala.ssa.SSACache

public class SSACache
extends java.lang.Object

A mapping from IMethod -> SSAOptions -> SoftReference -> Something This doesn't work very well ... GCs don't do such a great job with SoftReferences ... revamp it.


Constructor Summary
SSACache(IRFactory<IMethod> factory)
           
 
Method Summary
 DefUse findOrCreateDU(IMethod m, Context c, SSAOptions options)
           
 DefUse findOrCreateDU(IR ir, Context C)
           
 IR findOrCreateIR(IMethod m, Context c, SSAOptions options)
           
 void invalidate(IMethod method, Context c)
          Invalidate all cached information for a pair
 void invalidateDU(IMethod method, Context c)
          Invalidate the cached DefUse for a pair
 void invalidateIR(IMethod method, Context c)
          Invalidate the cached IR for a pair
 void wipe()
          The existence of this is unfortunate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSACache

public SSACache(IRFactory<IMethod> factory)
Parameters:
factory - a factory for creating IRs
Method Detail

findOrCreateIR

public IR findOrCreateIR(IMethod m,
                         Context c,
                         SSAOptions options)
Parameters:
m - a "normal" (bytecode-based) method
options - options governing ssa construction
Returns:
an IR for m, built according to the specified options. null if m is abstract or native.
Throws:
java.lang.IllegalArgumentException - if m is null

findOrCreateDU

public DefUse findOrCreateDU(IMethod m,
                             Context c,
                             SSAOptions options)
Parameters:
m - a method
options - options governing ssa construction
Returns:
DefUse information for m, built according to the specified options. null if unavailable
Throws:
java.lang.IllegalArgumentException - if m is null

findOrCreateDU

public DefUse findOrCreateDU(IR ir,
                             Context C)
Returns:
DefUse information for m, built according to the specified options. null if unavailable
Throws:
java.lang.IllegalArgumentException - if ir is null

wipe

public void wipe()
The existence of this is unfortunate.


invalidateIR

public void invalidateIR(IMethod method,
                         Context c)
Invalidate the cached IR for a pair


invalidateDU

public void invalidateDU(IMethod method,
                         Context c)
Invalidate the cached DefUse for a pair


invalidate

public void invalidate(IMethod method,
                       Context c)
Invalidate all cached information for a pair