Class ReturnSourceOrigins
- All Implemented Interfaces:
BiFunction<MutatedOnlyVariables.ReturningCallable, EK9Parser.ExpressionContext, Set<String>>
RECEIVER_ORIGIN when it may be the receiver's interior. Hold one; was
ReturnSourceKind.origins (no-statics lane P2, 2026-10-29). Which KIND of source it is, is
ReturnSourceClassifier.
A parameter or a property is itself; a call is what its callee's RETAINS says it returns, each
return <- source mapped back through the call - receiver-interior to whatever the call's receiver
is (items.getOrDefault(0, x) is items; a bare call of an own method is the receiver) and a named
parameter to the argument given for it (handBack(passed) is passed). A LOCAL is the union of what
it was made to refer to (MutatedOnlyVariables.Source: its reference assignments, an arm-shaped value's
returning variable, a dynamic class's captures, a stream's sources, a loop's iterated expression), followed
recursively - so mine <- items; iter <- mine.iterator(); rtn: iter.next() is the receiver (option B slice
D, 2026-11-13; the N-V review's CE-3). A WRAPPER built here holds what it keeps: a constructor call's origins are
those of the arguments the constructor keeps (a built-in's by its RETAINS or because it is a container -
KeepsArgument; a user constructor's by the front end's own verdict, CloseableArgumentKeeping.fateOf
- a copy constructor that copies is a loan and derives nothing), a list or dict literal's
those of its elements and values; a dynamic class or function holds what it captures. A value HELD by any of
these whose static type is a closed concrete core type (a String, an Integer - MayHoldUserObject) is a
value, never a view anything can be kept into, and is skipped (ofCapture(MutatedOnlyVariables.ReturningCallable, EK9Parser.ExpressionContext); E1b's own exemption) - a
closure over a String property hands back no part of the receiver, where one over a Node does. Anything
else - a literal, a call whose callee returns nothing held - is nothing. The callee's marks and the constructors'
fates are read as they stand, so the derivation runs this to a fixpoint (RetentionDerivation).
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final StringThe origin that stands for the callable's own receiver (itsthis, a property or a capture). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(MutatedOnlyVariables.ReturningCallable returning, EK9Parser.ExpressionContext source) The origins of one source.ofCapture(MutatedOnlyVariables.ReturningCallable returning, EK9Parser.ExpressionContext captured) The origins of a value a dynamic class or function CAPTURES (what the returned object holds): none for a value of a closed concrete core type - a String, an Integer - which is never a view of anything.The origins of what the returning variable itself was made to refer to by the routes only the local record carries - an arm-shaped value's returning variable, a dynamic class's captures, a stream's sources (<- rtn as List of Node: cat items | collect as List of Nodeholds the elements ofitems); its reference assignments are read throughapply(MutatedOnlyVariables.ReturningCallable, EK9Parser.ExpressionContext)as well, so this adds exactly the rest.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThen
-
Field Details
-
RECEIVER_ORIGIN
The origin that stands for the callable's own receiver (itsthis, a property or a capture).- See Also:
-
-
Constructor Details
-
ReturnSourceOrigins
ReturnSourceOrigins(CloseableArgumentKeeping keeping) - Parameters:
keeping- the keep side of the derivation: a user constructor's verdict on each of its arguments (fateOf), read as it stands on every pass.
-
-
Method Details
-
apply
public Set<String> apply(MutatedOnlyVariables.ReturningCallable returning, EK9Parser.ExpressionContext source) The origins of one source.- Specified by:
applyin interfaceBiFunction<MutatedOnlyVariables.ReturningCallable, EK9Parser.ExpressionContext, Set<String>>- Parameters:
returning- the method, operator, function or dynamic function whose returning variable it is, and the module it was parsed insource- the expression the returning variable is made to refer to
-
ofReturningVariable
The origins of what the returning variable itself was made to refer to by the routes only the local record carries - an arm-shaped value's returning variable, a dynamic class's captures, a stream's sources (<- rtn as List of Node: cat items | collect as List of Nodeholds the elements ofitems); its reference assignments are read throughapply(MutatedOnlyVariables.ReturningCallable, EK9Parser.ExpressionContext)as well, so this adds exactly the rest. -
ofCapture
public Set<String> ofCapture(MutatedOnlyVariables.ReturningCallable returning, EK9Parser.ExpressionContext captured) The origins of a value a dynamic class or function CAPTURES (what the returned object holds): none for a value of a closed concrete core type - a String, an Integer - which is never a view of anything.
-