Class MutatedOnlyVariables
java.lang.Object
org.ek9lang.compiler.phase5.MutatedOnlyVariables
What PRE_IR_CHECKS needs, collected during Walk 1 (by
PreIRListener, every source in parallel), to decide
the E08090 verdicts FULL_RESOLUTION deferred (item 5):
- every local marked
NOT_REFERENCED_DEFERRED- initialised by a call, afterwards only mutated in place, never read - with the expression it was initialised by (MutatedOnlyVariableOrError); - every user method, operator, function and dynamic function with a returning variable, with each expression
that variable is made to REFER to (its initialiser, every pointer assignment (pre-flows included), and through
an arm-shaped value the returning variable it yields), so
ReceiverInteriorReturnscan derive whether a method returns (part of) its receiver andCloseableReturnOrErrorcan require a closeable return to be new - both readingReturnSourceKind.
MutatedOnlyVariables.Collector.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) final classOne source's collection.(package private) static final recordA deferred local and the expression it was initialised by.(package private) static final recordA user method, operator, function or dynamic function with a returning variable, and every expression that variable is made to refer to. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) Collection<MutatedOnlyVariables.Deferred> deferred()(package private) MutatedOnlyVariables.CollectorforSource(ParsedModule parsedModule, SymbolsAndScopes symbolsAndScopes) The collector for one source's walk.(package private) Collection<MutatedOnlyVariables.ReturningCallable>
-
Constructor Details
-
MutatedOnlyVariables
MutatedOnlyVariables()
-
-
Method Details
-
forSource
MutatedOnlyVariables.Collector forSource(ParsedModule parsedModule, SymbolsAndScopes symbolsAndScopes) The collector for one source's walk. -
deferred
Collection<MutatedOnlyVariables.Deferred> deferred() -
returningCallables
Collection<MutatedOnlyVariables.ReturningCallable> returningCallables()
-