Class MarkStatementOwned

java.lang.Object
org.ek9lang.compiler.support.MarkStatementOwned
All Implemented Interfaces:
Consumer<CallSymbol>

public final class MarkStatementOwned extends Object implements 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 Details

    • MarkStatementOwned

      public MarkStatementOwned()
  • Method Details

    • accept

      public void accept(CallSymbol call)
      Record that the result of call is owned, and so closed, by its statement.
      Specified by:
      accept in interface Consumer<CallSymbol>