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
Constructors -
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:ItreeVisitorVisits a context binding itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
binding- the context binding itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a context recv itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
recv- the context recv itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a context arg vec itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
argVec- the context arg vec itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a num itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
num- the num itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a str itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
str- the str itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a nada itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
nada- the nada itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a seq itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
seq- the seq itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a fun itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
fun- the fun itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits an indexable fun itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
fun- the indexable fun itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a vec itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
vec- the vec itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a deref itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
deref- the deref itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a lderef itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
lderef- the lderef itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a varref itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
varref- the varref itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits an itree of letrec.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
letrec- the letrec itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits an assignment itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
assignment- the assignment itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits an assignment itree in the form[:A :B :C.opt :D.opt] <- xxx.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
assignment- the itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits an assignment itree in the form[:A :B :C.opt :D.opt :R.rest] <- xxx.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
assignment- the itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits an assignment itree in the form[:R.rest] <- xxx.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
assignment- the itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits an assignment itree in the form[:Foo [:X :Y]] <- xxx.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
assignment- the itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits an assignment itree in the form[:Foo X:Bar] <- Rhs.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
assignment- the itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a lstore itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
lstore- the lstore itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisists a store itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
store- the store itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisists an args passing itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
argsPassing- the arg passing itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisists a nested args passing itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
nestedArgsPassing- the nested args passing itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a bi arithmetic operation.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
arithmetic- the arithmetic operation itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits an itree ofnew_val('X' x 'Y' y).- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
newVal- the new_val itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits an itree ofnew_val(... Trait 'X' x 'Y' y).- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
newVal- the new_val itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits an itree of preloaded if on the tail context.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
preloadedIf- the preloaded if itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits an itree of branch without an else block on the tail context.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
branch- the branch itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits an itree of branch with an else block on the tail context.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
branch- the branch itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a mcall itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
mcall- the mcall itree.- Returns:
- the result.
-
visit
Description copied from interface:ItreeVisitorVisits a symcall itree.- Specified by:
visitin interfaceItreeVisitor<T>- Parameters:
scall- the symcall itree.- Returns:
- the result.
-