java.lang.Object
org.kink_lang.kink.internal.program.itree.FastFunItree
- All Implemented Interfaces:
Itree,ItreeElem,UsedDefinedVars
A fun in SSA (static single assignment) form.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.kink_lang.kink.internal.program.itree.ItreeElem
ItreeElem.Spread -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(ItreeVisitor<T> visitor) Accepts a visitor.body()Returns the fun body itree.Returns the set of local vars defined in the fun.booleanReturns the set of free local vars of the fun.getContent(LocalVar lvar) Returns the content for the local var.inthashCode()Mapping from the local var to the content.intpos()Returns the pos of the itree on the program text.toString()Returns the set of local vars used in the fun.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kink_lang.kink.internal.program.itree.UsedDefinedVars
isUsed
-
Constructor Details
-
FastFunItree
Constructs a fun itree in SSA form.- Parameters:
body- the fun body itree; must not expose the env.pos- the start pos of the fun.
-
-
Method Details
-
body
Returns the fun body itree.- Returns:
- the fun body itree.
-
pos
public int pos()Description copied from interface:ItreeReturns the pos of the itree on the program text. -
usedLvars
Description copied from interface:UsedDefinedVarsReturns the set of local vars used in the fun.- Specified by:
usedLvarsin interfaceUsedDefinedVars- Returns:
- the set of local vars used in the fun.
-
definedLvars
Description copied from interface:UsedDefinedVarsReturns the set of local vars defined in the fun.- Specified by:
definedLvarsin interfaceUsedDefinedVars- Returns:
- the set of local vars defined in the fun.
-
freeLvars
Description copied from interface:UsedDefinedVarsReturns the set of free local vars of the fun.- Specified by:
freeLvarsin interfaceUsedDefinedVars- Returns:
- the set of free local vars of the fun.
-
lvarContentMapping
Mapping from the local var to the content.- Returns:
- the mapping.
-
getContent
Description copied from interface:UsedDefinedVarsReturns the content for the local var.- Specified by:
getContentin interfaceUsedDefinedVars- Parameters:
lvar- the local var.- Returns:
- the content for the local var.
-
accept
Description copied from interface:ItreeAccepts a visitor. -
toString
-
hashCode
public int hashCode() -
equals
-