ptolemy.copernicus.java
Class DeadObjectEliminator

java.lang.Object
  extended by soot.Transformer
      extended by soot.BodyTransformer
          extended by ptolemy.copernicus.java.DeadObjectEliminator

public class DeadObjectEliminator
extends soot.BodyTransformer

A transformer that removes unnecessary object creations. If an attribute, type or token is created, but never used anywhere, then it can be safely removed. This is possible because types and tokens are immutable, and we know that the attribute constructor will not have any interesting side effects after code generation is completed.

Since:
Ptolemy II 2.0
Version:
$Id: DeadObjectEliminator.java,v 1.33 2006/02/07 00:48:04 cxh Exp $
Author:
Stephen Neuendorffer
Accepted Rating:
Red (cxh)
Proposed Rating:
Red (cxh)

Method Summary
protected  void internalTransform(soot.Body body, java.lang.String phaseName, java.util.Map options)
           
static DeadObjectEliminator v()
           
 
Methods inherited from class soot.BodyTransformer
transform, transform, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

v

public static DeadObjectEliminator v()

internalTransform

protected void internalTransform(soot.Body body,
                                 java.lang.String phaseName,
                                 java.util.Map options)
Specified by:
internalTransform in class soot.BodyTransformer