All Superinterfaces:
ItreeElem
All Known Subinterfaces:
ItreeWithRhs
All Known Implementing Classes:
ArgsPassingItree, ArgVecItree, AssignmentItree, BiArithmeticItree, BindingItree, BranchItree, BranchWithElseItree, DerefItree, FastFunItree, IfItree, LderefItree, LetRecItree, LstoreItree, McallItree, NadaItree, NestedArgsPassingItree, NestedVecAssignmentItree, NoTraitNewValItree, NumItree, OptRestVecAssignmentItree, OptVecAssignmentItree, RecvItree, RestVecAssignmentItree, SeqItree, SlowFunItree, StoreItree, StrItree, SymcallItree, TraitNewValItree, VarrefItree, VarrefVecAssignmentItree, VecItree

public non-sealed interface Itree extends ItreeElem
Itree (intermediate tree) representation of Kink programs.

Usually, itrees are translated from AST representation, and after optimization is applied, they are translated into instruction sequence. By existence of itree representation, ASTs can be separated from evaluation details.

Itree is similar to GENERIC/GIMPLE in GCC.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.kink_lang.kink.internal.program.itree.ItreeElem

    ItreeElem.Spread
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    accept(ItreeVisitor<T> visitor)
    Accepts a visitor.
    default Itree
    Returns the expression in the elem.
    default boolean
    Returns whether the type is SINGLE.
    int
    pos()
    Returns the pos of the itree on the program text.

    Methods inherited from interface org.kink_lang.kink.internal.program.itree.ItreeElem

    isSpread
  • Method Details

    • pos

      int pos()
      Returns the pos of the itree on the program text.
      Specified by:
      pos in interface ItreeElem
      Returns:
      the pos of the itree on the program text.
    • accept

      <T> T accept(ItreeVisitor<T> visitor)
      Accepts a visitor.
      Type Parameters:
      T - the result type of the visitor.
      Parameters:
      visitor - the visitor.
      Returns:
      the result of the visitor.
    • expr

      default Itree expr()
      Description copied from interface: ItreeElem
      Returns the expression in the elem.
      Specified by:
      expr in interface ItreeElem
      Returns:
      the expression in the elem.
    • isSingle

      default boolean isSingle()
      Description copied from interface: ItreeElem
      Returns whether the type is SINGLE.
      Specified by:
      isSingle in interface ItreeElem
      Returns:
      whether the type is SINGLE.