Class ReceiverInteriorReturns
JSON.get. The marker is
ReturnRetention.RECEIVER_INTERIOR, written by ReturnRetention.markReturnsReceiverInterior(MethodSymbol).
A method returns (part of) its receiver when its returning variable is made to refer to (initialiser or a
pointer assignment - ReferenceAssignment) any of:
thisorsuper;- one of its own properties, by bare name;
- a chain that starts at either and only steps through properties or calls that themselves return their
receiver's interior:
this.names,names.iterator(),members().first(); - a call of another of its own methods that returns its receiver's interior:
members().
The last two depend on other methods' markers, in any order and across files, so it runs to a FIXPOINT: marks only ever add, so it terminates, and the result does not depend on the order. Anything else - a copy, a constructor, a call on another object, an operator - is not followed, so the method keeps no marker.
A method, operator or FUNCTION whose returning variable is made to refer to one of its own parameters records
return <- <parameter> the same way (a function identity(x) hands back its argument, so what a caller
does to the result it does to the argument) - read by ReturnRetention.mayAlias(ScopedSymbol) and
ReturnRetention.retainsArgument(ScopedSymbol, int) exactly as a built-in's declaration is.
Each source is read through ReturnSourceKind - the same classification R5
(CloseableReturnOrError) reads - so the derivation and the error cannot disagree.
-
Method Summary
Modifier and TypeMethodDescription(package private) static voidderive(Collection<MutatedOnlyVariables.ReturningCallable> callables) Mark every callable that returns its receiver's interior or a parameter.(package private) static List<Map.Entry<ScopedSymbol, ScopedSymbol>> dispatchedHandlers(Collection<? extends ScopedSymbol> callables) THE dispatcher half of "what may a call through this declaration run" (the closeable route-matrix verifier, 2026-10-22): a call to a dispatcher entry point runs, at run time, the handler most specific to its argument's type - so the entry returns and keeps whatever any of its handlers does.(package private) static booleanisUserDeclaration(ScopedSymbol declaration) A declaration whose retention was not DECLARED by a built-in: derived marks only.(package private) static booleanmayOverride(ScopedSymbol callable) A method of an aggregate (dynamic classes included), or a function (dynamic functions included).(package private) static List<ScopedSymbol> overriddenBy(ScopedSymbol callable) The declarations a call through which may runcallable: those it overrides, or its super function - THE "what may a call through this declaration run" of the dispatch union, shared with the callee-keep derivation (CloseableArgumentKeeping), so what an override RETURNS and what it KEEPS are unioned over the same set.(package private) static booleanRecord on each dispatcher entry what its handlers return and keep; true when an entry gained a rule.
-
Method Details
-
derive
Mark every callable that returns its receiver's interior or a parameter. Writes squirrelled data: run under the lock. -
overriddenBy
The declarations a call through which may runcallable: those it overrides, or its super function - THE "what may a call through this declaration run" of the dispatch union, shared with the callee-keep derivation (CloseableArgumentKeeping), so what an override RETURNS and what it KEEPS are unioned over the same set. -
dispatchedHandlers
static List<Map.Entry<ScopedSymbol, ScopedSymbol>> dispatchedHandlers(Collection<? extends ScopedSymbol> callables) THE dispatcher half of "what may a call through this declaration run" (the closeable route-matrix verifier, 2026-10-22): a call to a dispatcher entry point runs, at run time, the handler most specific to its argument's type - so the entry returns and keeps whatever any of its handlers does. Each pair is (entry, handler), drawn fromDispatcherHandlers, the handler set phase 7 dispatches over, for every aggregate one ofcallablesbelongs to (a sub-type that adds a handler to an inherited entry is such an aggregate). Empty, and cheap, when no callable is named like a dispatcher entry. Without it a function that hands its loaned argument torouter.process(item)- the entry only reads it, theReshandler keeps it - was a loan: the statement closed the closeable the router then used. -
unionDispatchedHandlers
Record on each dispatcher entry what its handlers return and keep; true when an entry gained a rule. -
isUserDeclaration
A declaration whose retention was not DECLARED by a built-in: derived marks only. -
mayOverride
A method of an aggregate (dynamic classes included), or a function (dynamic functions included).
-