Package ptolemy.copernicus.kernel
Class SideEffectFreeInvocationRemover
- java.lang.Object
-
- soot.Transformer
-
- soot.SceneTransformer
-
- ptolemy.copernicus.kernel.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.java.lang.String
getDeclaredOptions()
Return the declared options.java.lang.String
getDefaultOptions()
Return the default options.protected void
internalTransform(java.lang.String phaseName, java.util.Map options)
static SideEffectFreeInvocationRemover
v()
-
-
-
Method Detail
-
v
public static SideEffectFreeInvocationRemover v()
-
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 classsoot.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.
-
-