Class SideEffectFreeInvocationRemover


  • public class SideEffectFreeInvocationRemover
    extends soot.SceneTransformer
    Remove any calls to other methods from the given method that have no side effects and whose return value is dead. A method has no side effects if it does not assign the value to any fields.
    Since:
    Ptolemy II 4.0
    Version:
    $Id$
    Author:
    Steve Neuendorffer
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Method Detail

      • getDefaultOptions

        public java.lang.String getDefaultOptions()
        Return the default options.
        Returns:
        The default options, which in this case is the empty string.
      • getDeclaredOptions

        public java.lang.String getDeclaredOptions()
        Return the declared options.
        Returns:
        The declared options, which in this case is the empty string.
      • internalTransform

        protected void internalTransform​(java.lang.String phaseName,
                                         java.util.Map options)
        Specified by:
        internalTransform in class soot.SceneTransformer
      • _removeSideEffectFreeMethodCalls

        public static void _removeSideEffectFreeMethodCalls​(soot.SootMethod method,
                                                            soot.jimple.toolkits.callgraph.CallGraph callGraph,
                                                            SideEffectAnalysis analysis)
        Remove any calls to other methods from the given method that have no side effects and whose return value is dead. A method has no side effects if it does not assign the value to any fields.
        Parameters:
        method - The given method.
        callGraph - the call graph.
        analysis - the analysis.