Class SSACache

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

public class SSACache extends 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 Details

    • SSACache

      public SSACache(IRFactory<IMethod> factory, com.ibm.wala.ssa.IAuxiliaryCache irCache, com.ibm.wala.ssa.IAuxiliaryCache duCache)
      Parameters:
      factory - a factory for creating IRs
  • Method Details

    • 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:
      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:
      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:
      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 <method,context> pair
    • invalidateDU

      public void invalidateDU(IMethod method, Context c)
      Invalidate the cached DefUse for a <method,context> pair
    • invalidate

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