Module org.kink_lang.kink
Class EliminateUnusedOptimizer
java.lang.Object
org.kink_lang.kink.internal.program.itree.SkeltonItreeVisitor<Itree>
org.kink_lang.kink.internal.program.itreeoptimize.BaseOptimizer
org.kink_lang.kink.internal.program.itreeoptimize.EliminateUnusedOptimizer
- All Implemented Interfaces:
Function<Itree,
,Itree> UnaryOperator<Itree>
,ItreeVisitor<Itree>
Eliminates unused code from a seq.
Unused code are expressions (1) which do not not have side effect and (2) the result of which is removed just after evaluated, and (3) the execution shall not raise an exception.
-
Constructor Summary
-
Method Summary
Methods inherited from class org.kink_lang.kink.internal.program.itreeoptimize.BaseOptimizer
apply
Methods inherited from class org.kink_lang.kink.internal.program.itree.SkeltonItreeVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
Constructor Details
-
EliminateUnusedOptimizer
public EliminateUnusedOptimizer()
-
-
Method Details
-
visit
Description copied from interface:ItreeVisitor
Visits a seq itree.- Specified by:
visit
in interfaceItreeVisitor<Itree>
- Overrides:
visit
in classSkeltonItreeVisitor<Itree>
- Parameters:
seq
- the seq itree.- Returns:
- the result.
-