Class MarkStatementOwned
java.lang.Object
org.ek9lang.compiler.support.MarkStatementOwned
- All Implemented Interfaces:
Consumer<CallSymbol>
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) and
records it here; everything else READS it through IsOwnedByItsStatement - phase 7 into the CALL it
generates (CallDetails.statementOwned), and then 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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(CallSymbol call) Record that the result ofcallis owned, and so closed, by its statement.
-
Constructor Details
-
MarkStatementOwned
public MarkStatementOwned()
-
-
Method Details
-
accept
Record that the result ofcallis owned, and so closed, by its statement.- Specified by:
acceptin interfaceConsumer<CallSymbol>
-