Class StreamHelperCalls

java.lang.Object
org.ek9lang.compiler.phase7.support.StreamHelperCalls

public final class StreamHelperCalls extends Object
THE call shapes for the compiler-to-runtime helper types stream pipelines lower onto (Ek9Async, Ek9Group, Ek9Split, Ek9Join, Ek9Uniq, the tail buffer, Ek9Sort) - use these (hold one), do not hand-roll another; the sibling of ListBufferCalls, which owns the List buffer.

PLUMBING: every call here is made on a runtime helper that has no EK9 symbol, because it is the compiler's own lowering, so none carries call metadata (purity and complexity describe something a user authored, see CompilerPlumbingCalls). The null metadata is stated once, here. When the metadata question for these calls is decided, this is the one place that changes.

Return type names are kept exactly as the call sites always spelled them ("Boolean" for a question answered by a helper, Any for an element), as nothing in the @IR goldens can see them.

  • Constructor Details

    • StreamHelperCalls

      public StreamHelperCalls()
  • Method Details

    • create

      public CallDetails create(String helperTypeName)
      The static create() of a helper type: a fresh helper typed as itself.
    • guardDiffer

      public CallDetails guardDiffer(String sourceVar, String sinkVar)
      The static Ek9StreamGuard.differ(source, sink): fails when a stream's evaluated source and one of its appending sinks are the same object (THE run-time alias check, Steve 2026-10-27).
    • createTail

      public CallDetails createTail(String tailTypeName, String integerTypeName, String limitVar)
      The static create(Integer limit) of the tail buffer type.
    • hasNext

      public CallDetails hasNext(String sourceVar, String sourceTypeName, String hasNextMethod)
      source.hasNext() on a drained helper (async executor, tracker or tail buffer): a Boolean.
    • next

      public CallDetails next(String sourceVar, String sourceTypeName, String nextMethod)
      source.next() on a drained helper: an Any element.
    • asyncSubmit

      public CallDetails asyncSubmit(String executorVar, String itemVar)
      executor.submit(item).
    • asyncClose

      public CallDetails asyncClose(String executorVar)
      executor.close().
    • asyncCancel

      public CallDetails asyncCancel(String executorVar)
      executor.cancel().
    • asyncSortResults

      public CallDetails asyncSortResults(String executorVar)
      executor.sortResults().
    • groupIsKeyChanged

      public CallDetails groupIsKeyChanged(String groupTrackerVar, String keyVar)
      group.isKeyChanged(key): a Boolean.
    • groupIsKeyChanged

      public CallDetails groupIsKeyChanged(String groupTrackerVar, String keyVar, String elementVar)
      group.isKeyChanged(key, element) for group by: the key AND the element it was made from, so an unset ELEMENT is kept for the final unset group whatever its key is (D24, sort | group).
    • addGroup

      public CallDetails addGroup(String trackerVar, String trackerTypeName, String groupVar)
      tracker.addGroup(group) on a group or split tracker.
    • wasStarted

      public CallDetails wasStarted(String trackerVar, String trackerTypeName)
      tracker.wasStarted() on a group or split tracker: a Boolean.
    • hasNextGroup

      public CallDetails hasNextGroup(String trackerVar, String trackerTypeName)
      tracker.hasNextGroup() on a group or split tracker: a Boolean.
    • nextGroup

      public CallDetails nextGroup(String trackerVar, String trackerTypeName)
      tracker.nextGroup() on a group or split tracker: an Any group.
    • splitIsBoundary

      public CallDetails splitIsBoundary(String splitTrackerVar, String itemVar, String predicateResultVar)
      split.isBoundary(item, predicateResult): the item and the boundary predicate's answer for it; a primitive boolean. An unset ITEM is kept for the final unset group and is never a boundary (D24, split).
    • joinIsFirst

      public CallDetails joinIsFirst(String joinTrackerVar)
      join.isFirst(): a Boolean.
    • joinHasResult

      public CallDetails joinHasResult(String joinTrackerVar)
      join.hasResult(): a Boolean.
    • uniqIsNew

      public CallDetails uniqIsNew(String uniqTrackerVar, String itemVar)
      uniq.isNew(item): a Boolean.
    • tailPipe

      public CallDetails tailPipe(String tailBufferVar, String tailTypeName, String itemVar)
      tail.pipe(item) on the tail buffer.
    • sort

      public CallDetails sort(String listTypeName, String bufferVar)
      The static Ek9Sort.sort(buffer).
    • sort

      public CallDetails sort(String listTypeName, String bufferVar, String comparatorVar)
      The static Ek9Sort.sort(buffer, comparator).