Class BasicOptimizer


public class BasicOptimizer
extends java.lang.Object

The BasicOptimizer only performs two optimizations: constant folding and dead code elimination.

Expressions that contain known values at compile time can be replaced with a constant expression. This basic optimization is known as constant folding. It improves runtime performance and reduces the size of generated code.

Statements that are known at compile time to be unreachable (sometimes as a result of constant folding) can be removed. This is dead code elimination, and it mainly reduces the size of generated code. It can also improve runtime performance.

45 6 5/31/01
Brian S O'Neill

Constructor Summary
BasicOptimizer(Node tree)
Method Summary
 Node optimize()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public BasicOptimizer(Node tree)
Method Detail


public Node optimize()