Class StatementOwnership
java.lang.Object
org.ek9lang.compiler.support.StatementOwnership
THE mark that a call's closeable result is owned by the block statement that makes it, so that statement closes
it when it finishes (the unnamed half of the closeable ownership rule, Steve 2026-10-05). Code in no statement is
owned by its returning-variable or property initialiser, or its text string (
MustExecutePosition, 2026-10-06);
phase 7 closes it in the evaluation it finds the call in (StatementOwnedCloseables).
Phase 5 DECIDES it on the call's own resolved CallSymbol (phase5/StatementOwnedCloseableCalls),
phase 7 READS it into the CALL it generates (CallDetails.statementOwned) and only emits the owner and the
close. Never re-derive the decision from IR: the IR names a callee by strings, and the overload phase 3 resolved
is the one that is called.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisOwnedByItsStatement(ISymbol recorded) Isrecordeda call whose result its statement owns (and closes).static voidmark(CallSymbol call) Record that the result ofcallis owned, and so closed, by its statement.
-
Method Details
-
mark
Record that the result ofcallis owned, and so closed, by its statement. -
isOwnedByItsStatement
Isrecordeda call whose result its statement owns (and closes).
-