Module org.kink_lang.kink
Interface ControlGenerator
- All Known Implementing Classes:
OverriddenControlGenerator
,UnchangedControlGenerator
public interface ControlGenerator
Generates insns of controls.
-
Method Summary
Modifier and TypeMethodDescriptionbranch
(BranchItree itree, BiFunction<Itree, org.kink_lang.kink.internal.compile.javaclassir.ResultContext, List<Insn>> generate, org.kink_lang.kink.internal.compile.javaclassir.ResultContext resultCtx) Generates insns of branch without else.branchWithElse
(BranchWithElseItree itree, BiFunction<Itree, org.kink_lang.kink.internal.compile.javaclassir.ResultContext, List<Insn>> generate, org.kink_lang.kink.internal.compile.javaclassir.ResultContext resultCtx) Generates insns of branch with else.noTraitNewVal
(NoTraitNewValItree itree, BiFunction<Itree, org.kink_lang.kink.internal.compile.javaclassir.ResultContext, List<Insn>> generate, org.kink_lang.kink.internal.compile.javaclassir.ResultContext resultCtx) Generates insns of new_val without trait.preloadedIf
(IfItree itree, BiFunction<Itree, org.kink_lang.kink.internal.compile.javaclassir.ResultContext, List<Insn>> generate, org.kink_lang.kink.internal.compile.javaclassir.ResultContext resultCtx) Generates insns ofif
preloaded fun.traitNewVal
(TraitNewValItree itree, BiFunction<Itree, org.kink_lang.kink.internal.compile.javaclassir.ResultContext, List<Insn>> generate, org.kink_lang.kink.internal.compile.javaclassir.ResultContext resultCtx) Generates insns of new_val with trait.
-
Method Details
-
preloadedIf
List<Insn> preloadedIf(IfItree itree, BiFunction<Itree, org.kink_lang.kink.internal.compile.javaclassir.ResultContext, List<Insn>> generate, org.kink_lang.kink.internal.compile.javaclassir.ResultContext resultCtx) Generates insns ofif
preloaded fun.- Parameters:
itree
- the itree to compile.generate
- generates insns of sub expressions.resultCtx
- the result context ofif
.- Returns:
- insns.
-
branch
List<Insn> branch(BranchItree itree, BiFunction<Itree, org.kink_lang.kink.internal.compile.javaclassir.ResultContext, List<Insn>> generate, org.kink_lang.kink.internal.compile.javaclassir.ResultContext resultCtx) Generates insns of branch without else.- Parameters:
itree
- the itree to compile.generate
- generates insns of sub expressions.resultCtx
- the result context of branch.- Returns:
- insns.
-
branchWithElse
List<Insn> branchWithElse(BranchWithElseItree itree, BiFunction<Itree, org.kink_lang.kink.internal.compile.javaclassir.ResultContext, List<Insn>> generate, org.kink_lang.kink.internal.compile.javaclassir.ResultContext resultCtx) Generates insns of branch with else.- Parameters:
itree
- the itree to compile.generate
- generates insns of sub expressions.resultCtx
- the result context of branch.- Returns:
- insns.
-
traitNewVal
List<Insn> traitNewVal(TraitNewValItree itree, BiFunction<Itree, org.kink_lang.kink.internal.compile.javaclassir.ResultContext, List<Insn>> generate, org.kink_lang.kink.internal.compile.javaclassir.ResultContext resultCtx) Generates insns of new_val with trait.- Parameters:
itree
- the itree to compile.generate
- generates insns of sub expressions.resultCtx
- the result context of new_val.- Returns:
- insns.
-
noTraitNewVal
List<Insn> noTraitNewVal(NoTraitNewValItree itree, BiFunction<Itree, org.kink_lang.kink.internal.compile.javaclassir.ResultContext, List<Insn>> generate, org.kink_lang.kink.internal.compile.javaclassir.ResultContext resultCtx) Generates insns of new_val without trait.- Parameters:
itree
- the itree to compile.generate
- generates insns of sub expressions.resultCtx
- the result context of new_val.- Returns:
- insns.
-