at.dms.optimize
Class Optimizer
java.lang.Object
|
+--at.dms.optimize.Optimizer
- All Implemented Interfaces:
- AccessorContainer
- public class Optimizer
- extends java.lang.Object
- implements AccessorContainer
This class is the entry point for the peephole byte code optimizer.
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Optimizer
public Optimizer(CodeInfo codeInfo)
- Constructs a new optimizer object.
optimize
public static CodeInfo optimize(CodeInfo code,
int level)
- Optimizes the byte code for a single method.
getCodeInfo
public CodeInfo getCodeInfo()
- Returns a new, optimized code info structure.
transformAccessors
public void transformAccessors(AccessorTransformer transformer)
throws BadAccessorException
- Transforms targets (deferences to actual instructions).
- Specified by:
transformAccessors
in interface AccessorContainer
- Following copied from interface:
at.dms.classfile.AccessorContainer
- Parameters:
transformer
- The transformer used to transform accessors.
setCodeStart
public void setCodeStart(InstructionHandle handle)
getCodeStart
public InstructionHandle getCodeStart()