Package com.helix.core.bytecode
Class BytecodeOptimizer
java.lang.Object
com.helix.core.bytecode.BytecodeOptimizer
Bytecode & AST Optimizer engine orchestrating constant folding and dead code elimination passes.
Can be enabled or disabled dynamically.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanoptimize(ExpressionNode astRoot) Optimizes the given AST root expression tree through iterative constant folding and dead code elimination passes.voidsetEnabled(boolean enabled)
-
Constructor Details
-
BytecodeOptimizer
public BytecodeOptimizer() -
BytecodeOptimizer
public BytecodeOptimizer(boolean enabled)
-
-
Method Details
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled) -
optimize
Optimizes the given AST root expression tree through iterative constant folding and dead code elimination passes.- Parameters:
astRoot- raw AST root- Returns:
- optimized AST root (or original if disabled/null)
-