org.teatrove.tea.compiler
Class BasicOptimizer
java.lang.Object
org.teatrove.tea.compiler.BasicOptimizer
public class BasicOptimizer
- extends 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.
- Author:
- Brian S O'Neill
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicOptimizer
public BasicOptimizer(Node tree)
optimize
public Node optimize()
Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.