java.lang.Object
java.lang.Record
org.aya.terck.CallResolver
- Record Components:
targets- only search calls to those definitions
- All Implemented Interfaces:
Consumer<Term>,DefConsumer,TermConsumer
public record CallResolver(PrimDef.Factory factory, @NotNull FnDef caller, @NotNull kala.collection.mutable.MutableSet<Def> targets, @NotNull kala.value.MutableValue<Term.Matching> currentMatching, @NotNull CallGraph<Def,Term.Param> graph)
extends Record
implements DefConsumer
Resolve calls and build call graph of recursive functions,
after
StmtTycker.-
Constructor Summary
ConstructorsConstructorDescriptionCallResolver(PrimDef.Factory factory, @NotNull FnDef caller, @NotNull kala.collection.mutable.MutableSet<Def> targets, @NotNull kala.value.MutableValue<Term.Matching> currentMatching, @NotNull CallGraph<Def, Term.Param> graph) Creates an instance of aCallResolverrecord class.CallResolver(PrimDef.Factory factory, @NotNull FnDef fn, @NotNull kala.collection.mutable.MutableSet<Def> targets, @NotNull CallGraph<Def, Term.Param> graph) -
Method Summary
Modifier and TypeMethodDescription@NotNull FnDefcaller()Returns the value of thecallerrecord component.@NotNull kala.value.MutableValue<Term.Matching>Returns the value of thecurrentMatchingrecord component.final booleanIndicates whether some other object is "equal to" this one.factory()Returns the value of thefactoryrecord component.@NotNull CallGraph<Def,Term.Param> graph()Returns the value of thegraphrecord component.final inthashCode()Returns a hash code value for this object.void@NotNull kala.collection.mutable.MutableSet<Def>targets()Returns the value of thetargetsrecord component.final StringtoString()Returns a string representation of this record class.voidvisitMatching(Term.Matching matching) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.aya.core.visitor.DefConsumer
accept, partial, visitPatMethods inherited from interface org.aya.core.visitor.TermConsumer
accept, post
-
Constructor Details
-
CallResolver
public CallResolver(@NotNull PrimDef.Factory factory, @NotNull @NotNull FnDef fn, @NotNull @NotNull kala.collection.mutable.MutableSet<Def> targets, @NotNull @NotNull CallGraph<Def, Term.Param> graph) -
CallResolver
public CallResolver(@NotNull PrimDef.Factory factory, @NotNull @NotNull FnDef caller, @NotNull @NotNull kala.collection.mutable.MutableSet<Def> targets, @NotNull @NotNull kala.value.MutableValue<Term.Matching> currentMatching, @NotNull @NotNull CallGraph<Def, Term.Param> graph) Creates an instance of aCallResolverrecord class.- Parameters:
factory- the value for thefactoryrecord componentcaller- the value for thecallerrecord componenttargets- the value for thetargetsrecord componentcurrentMatching- the value for thecurrentMatchingrecord componentgraph- the value for thegraphrecord component
-
-
Method Details
-
visitMatching
- Specified by:
visitMatchingin interfaceDefConsumer
-
pre
- Specified by:
prein interfaceTermConsumer
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
factory
Returns the value of thefactoryrecord component.- Returns:
- the value of the
factoryrecord component
-
caller
Returns the value of thecallerrecord component.- Returns:
- the value of the
callerrecord component
-
targets
Returns the value of thetargetsrecord component.- Returns:
- the value of the
targetsrecord component
-
currentMatching
Returns the value of thecurrentMatchingrecord component.- Returns:
- the value of the
currentMatchingrecord component
-
graph
Returns the value of thegraphrecord component.- Returns:
- the value of the
graphrecord component
-