Module org.kink_lang.kink
Class SkeltonItreeVisitor<T>
java.lang.Object
org.kink_lang.kink.internal.program.itree.SkeltonItreeVisitor<T>
- Type Parameters:
T
- the type of the result.
- All Implemented Interfaces:
ItreeVisitor<T>
- Direct Known Subclasses:
BaseOptimizer
An itree visitor with a default make.
The visit methods are supposed to be overridden by subclasses where the default make is not appropriate.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvisit
(ArgsPassingItree argsPassing) Visists an args passing itree.visit
(ArgVecItree argVec) Visits a context arg vec itree.visit
(AssignmentItree assignment) Visits an assignment itree.visit
(BiArithmeticItree arithmetic) Visits a bi arithmetic operation.visit
(BindingItree binding) Visits a context binding itree.visit
(BranchItree branch) Visits an itree of branch without an else block on the tail context.visit
(BranchWithElseItree branch) Visits an itree of branch with an else block on the tail context.visit
(DerefItree deref) Visits a deref itree.visit
(FastFunItree fun) Visits an indexable fun itree.Visits an itree of preloaded if on the tail context.visit
(LderefItree lderef) Visits a lderef itree.visit
(LetRecItree letrec) Visits an itree of letrec.visit
(LstoreItree lstore) Visits a lstore itree.visit
(McallItree mcall) Visits a mcall itree.Visits a nada itree.visit
(NestedArgsPassingItree nestedArgsPassing) Visists a nested args passing itree.visit
(NestedVecAssignmentItree assignment) Visits an assignment itree in the form[:Foo [:X :Y]] <- xxx
.visit
(NoTraitNewValItree newVal) Visits an itree ofnew_val('X' x 'Y' y)
.Visits a num itree.visit
(OptRestVecAssignmentItree assignment) Visits an assignment itree in the form[:A :B :C.opt :D.opt :R.rest] <- xxx
.visit
(OptVecAssignmentItree assignment) Visits an assignment itree in the form[:A :B :C.opt :D.opt] <- xxx
.Visits a context recv itree.visit
(RestVecAssignmentItree assignment) Visits an assignment itree in the form[:R.rest] <- xxx
.Visits a seq itree.visit
(SlowFunItree fun) Visits a fun itree.visit
(StoreItree store) Visists a store itree.Visits a str itree.visit
(SymcallItree scall) Visits a symcall itree.visit
(TraitNewValItree newVal) Visits an itree ofnew_val(... Trait 'X' x 'Y' y)
.visit
(VarrefItree varref) Visits a varref itree.visit
(VarrefVecAssignmentItree assignment) Visits an assignment itree in the form[:Foo X:Bar] <- Rhs
.Visits a vec itree.
-
Constructor Details
-
SkeltonItreeVisitor
Constructs a visitor.- Parameters:
defaultAction
- the default make of visitor methods.
-
-
Method Details
-
visit
Description copied from interface:ItreeVisitor
Visits a context binding itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
binding
- the context binding itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a context recv itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
recv
- the context recv itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a context arg vec itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
argVec
- the context arg vec itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a num itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
num
- the num itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a str itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
str
- the str itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a nada itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
nada
- the nada itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a seq itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
seq
- the seq itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a fun itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
fun
- the fun itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits an indexable fun itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
fun
- the indexable fun itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a vec itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
vec
- the vec itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a deref itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
deref
- the deref itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a lderef itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
lderef
- the lderef itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a varref itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
varref
- the varref itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits an itree of letrec.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
letrec
- the letrec itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits an assignment itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
assignment
- the assignment itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits an assignment itree in the form[:A :B :C.opt :D.opt] <- xxx
.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
assignment
- the itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits an assignment itree in the form[:A :B :C.opt :D.opt :R.rest] <- xxx
.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
assignment
- the itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits an assignment itree in the form[:R.rest] <- xxx
.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
assignment
- the itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits an assignment itree in the form[:Foo [:X :Y]] <- xxx
.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
assignment
- the itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits an assignment itree in the form[:Foo X:Bar] <- Rhs
.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
assignment
- the itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a lstore itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
lstore
- the lstore itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visists a store itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
store
- the store itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visists an args passing itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
argsPassing
- the arg passing itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visists a nested args passing itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
nestedArgsPassing
- the nested args passing itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a bi arithmetic operation.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
arithmetic
- the arithmetic operation itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits an itree ofnew_val('X' x 'Y' y)
.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
newVal
- the new_val itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits an itree ofnew_val(... Trait 'X' x 'Y' y)
.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
newVal
- the new_val itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits an itree of preloaded if on the tail context.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
preloadedIf
- the preloaded if itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits an itree of branch without an else block on the tail context.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
branch
- the branch itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits an itree of branch with an else block on the tail context.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
branch
- the branch itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a mcall itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
mcall
- the mcall itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitor
Visits a symcall itree.- Specified by:
visit
in interfaceItreeVisitor<T>
- Parameters:
scall
- the symcall itree.- Returns:
- the result.
-