Class DemandSegmentEnd

java.lang.Object
org.ek9lang.compiler.phase7.generator.DemandSegmentEnd
All Implemented Interfaces:
ToIntFunction<List<EK9Parser.StreamPartContext>>

final class DemandSegmentEnd extends Object implements ToIntFunction<List<EK9Parser.StreamPartContext>>
THE index of the first stage that ends a pipeline's demand segment, or -1 when every stage streams (StreamDemand, decision 10 rule B). The stages before it are the ones a head among them can stop pulling for - which is also how far a multi-source cat a, b pulls each source in turn before it must gather (decision 15 b). Which stage ends a segment is EndsDemandSegment, shared with the front end's boundedness checks. Hold an instance.