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
-
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(ItreeVisitor<T> visitor) Accepts a visitor.body()
Returns the fun body itree.Returns the set of local vars defined in the fun.boolean
Returns the set of free local vars of the fun.getContent
(LocalVar lvar) Returns the content for the local var.int
hashCode()
Mapping from the local var to the content.int
pos()
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, wait
Methods 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:Itree
Returns the pos of the itree on the program text. -
usedLvars
Description copied from interface:UsedDefinedVars
Returns the set of local vars used in the fun.- Specified by:
usedLvars
in interfaceUsedDefinedVars
- Returns:
- the set of local vars used in the fun.
-
definedLvars
Description copied from interface:UsedDefinedVars
Returns the set of local vars defined in the fun.- Specified by:
definedLvars
in interfaceUsedDefinedVars
- Returns:
- the set of local vars defined in the fun.
-
freeLvars
Description copied from interface:UsedDefinedVars
Returns the set of free local vars of the fun.- Specified by:
freeLvars
in 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:UsedDefinedVars
Returns the content for the local var.- Specified by:
getContent
in interfaceUsedDefinedVars
- Parameters:
lvar
- the local var.- Returns:
- the content for the local var.
-
accept
Description copied from interface:Itree
Accepts a visitor. -
toString
-
hashCode
public int hashCode() -
equals
-