Module org.kink_lang.kink
Package org.kink_lang.kink.internal.program.itree
package org.kink_lang.kink.internal.program.itree
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.
-
ClassDescriptionItree for args passing such as
[:X :Y :Z] <- \args
.A context arg vec itree.Itree of an assignment.An arithmetic operation whose second operand is a number literal.Type of arithmetic operations.An itree of a context binding.Invocation of branch in the following form.Invocation of branch in the following form.Cond-then pair of branch.Analyzes contents of local vars in ssa-funs.Transforms an itree traversing the sub itrees in the evaluation order.Callback forDeepTransformer.deepTransform(Itree, Callback)
.A deref itree.A fun in SSA (static single assignment) form.Generic var.An itree of invocation ofif
preloaded fun.Itree (intermediate tree) representation of Kink programs.An elem of vec bodies or actual args.ItreeElem of SPREAD type.ItreeVisitor<T>A visitor ofItree
s.Itree which supportsitree.rhs()
.A lderef itree.Letrec itree.Pair of local var and the corresponding fun.Sym of a local var.Sym generated during SSA-conversion.Sym which is specified by the program.Analyzed content of a local var.Another local var.The indexed arg in the fun.The recv in the fun.Unknown content.Itree of local var assignment such as:X <- 42
.A mcall itree.A nada itree.Itree of an args passing in the form[:X [:A :B] :Y] <- \args
.Algebraic data type of params of NestedArgsPassingItree.Param which is a tuple of lvars.Itree of an args passing in the form[:X [:A :B] :Y] <- Rhs
.A function which translates an AST node into an itree.Itree of new_val('X' x 'Y' y).A num itree.Assignment in the form[:A :B :C.opt :D.opt :R.rest] <- xxx
.Assignment in the form[:A :B :C.opt :D.opt] <- xxx
.A context recv itree.Assignment to a vec in the form[:R.rest] <- xxx
.An itree of sequential evaluation; that corresponds to a not-empty seq node.An itree visitor with a default make.A fun itree which is not in SSA (static single assignment) form.Itree of nonlocal var assignment such asB:X <- 42
.A str itree.A fun call which is not a method call, and has a sym.Sym-val pair of new_val.Itree of new_val(...Provides access to used/defined local vars in a fun.A varref itree.Algebraic data type of a varref param: local(name) | generic(owner, name).Assignment in the form[:Foo X:Bar] <- Rhs
.A vec itree.