Class RetainedBy
java.lang.Object
org.ek9lang.compiler.support.sharing.RetainedBy
- All Implemented Interfaces:
BiFunction<EK9Parser.ExpressionContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, List<ObjectSharing.Use>>
final class RetainedBy
extends Object
implements BiFunction<EK9Parser.ExpressionContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, List<ObjectSharing.Use>>
THE retention walk of
ObjectSharing (D61): the object an expression evaluates to (or contains) - what keeps
it? The variable it is stored in, a container it is added to or put in a literal of, a call or constructor that may
keep its argument, a for loop's variable, a stream's holders, or the returning variable of a construct
whose value is assigned - ObjectSharing.Kind.SHARED with a nameable holder, else
ObjectSharing.Kind.ESCAPES.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(EK9Parser.ExpressionContext expression, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded) The objectexpressionevaluates to (or contains) - what keeps it?Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThen
-
Constructor Details
-
RetainedBy
RetainedBy()
-
-
Method Details
-
apply
public List<ObjectSharing.Use> apply(EK9Parser.ExpressionContext expression, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded) The objectexpressionevaluates to (or contains) - what keeps it?- Specified by:
applyin interfaceBiFunction<EK9Parser.ExpressionContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, List<ObjectSharing.Use>>
-