Interface ControlGenerator

All Known Implementing Classes:
OverriddenControlGenerator, UnchangedControlGenerator

public interface ControlGenerator
Generates insns of controls.
  • 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 of if preloaded fun.
      Parameters:
      itree - the itree to compile.
      generate - generates insns of sub expressions.
      resultCtx - the result context of if.
      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.