Module org.kink_lang.kink
Class BranchWithElseInliner
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.BranchWithElseInliner
- All Implemented Interfaces:
Function<Itree,
,Itree> UnaryOperator<Itree>
,ItreeVisitor<Itree>
Applies inlining of calls of branch in the form below.
branch( { cond1 } { body1 } { cond2 } { body2 } ,,, { condn } { bodyn } $true { elseBody } )
This inlining must take place under the body of IndexFunItree.
Conds must not modify local vars, because it wrongly affects dereferences in other conds and result bodies.
-
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
-
BranchWithElseInliner
public BranchWithElseInliner()
-
-
Method Details
-
visit
Description copied from interface:ItreeVisitor
Visits a symcall itree.- Specified by:
visit
in interfaceItreeVisitor<Itree>
- Overrides:
visit
in classSkeltonItreeVisitor<Itree>
- Parameters:
org
- the symcall itree.- Returns:
- the result.
-