Module org.kink_lang.kink
Class LetSymcallInliner
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.LetSymcallInliner
- All Implemented Interfaces:
Function<Itree,
,Itree> UnaryOperator<Itree>
,ItreeVisitor<Itree>
Inlining optimizer of a let clause on the tail context.
Example program before inlining:
{ do_foo{ ,,, } :X = produce_arg do_bar{ ,,, } }
The program above is converted to:
{ do_foo{ ,,, } {(:X) do_bar{ ,,, } }!call![()](produce_arg) }
This optimizer converts the program roughly to the following.
{ do_foo{ ,,, } :X <- (* change to the new local binding here *) produce_arg do_bar{ ,,, } }
-
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
-
LetSymcallInliner
public LetSymcallInliner()
-
-
Method Details
-
visit
Description copied from interface:ItreeVisitor
Visits an indexable fun itree.- Specified by:
visit
in interfaceItreeVisitor<Itree>
- Overrides:
visit
in classSkeltonItreeVisitor<Itree>
- Parameters:
fun
- the indexable fun itree.- Returns:
- the result.
-