Class InputClassProbeGenerator

java.lang.Object
org.ek9lang.compiler.phase7.generation.InputClassProbeGenerator

public final class InputClassProbeGenerator extends Object
THE input-class probe of a public construct's entry - the dynamic input-variety numerator (design §5) - and the LOAD_FIELD walk that decomposes a record dimension into its leaves (IR tidy W3.9, INFRA-10: it was the IR generating quarter of CoverageProbePlacer). The placer still owns the function being probed (its name is the probe's function) and whether input variety is on; this owns the cells. Use it for every input-class probe, never a second walk.
  • Field Details

    • KEY_LINE_SEPARATOR

      public static final String KEY_LINE_SEPARATOR
      Separates a construct's name from its declaration line in the input-variety key. Both the probe (here) and the denominator (InputVarietyReportBuilder) must build the key the same way, or the numerator's cells never find their floor.
      See Also:
  • Constructor Details

  • Method Details

    • apply

      public List<IRInstr> apply(ISymbol operationSymbol, DebugInfo debugInfo, String scopeId)
      Create an input-class probe for a public construct's entry (the dynamic numerator, §5).

      In scope exactly when the phase-5 InputVarietyDenominatorRecorder squirrelled an INPUT_VARIETY_FLOOR on this callable — reusing that scoping decision rather than re-deriving genus/visibility rules (built-ins, entry shims and no-denominator constructs are thereby excluded, §7). When the recorder also counted the receiver as the implicit p0 (§4.5, marked by CommonValues.INPUT_VARIETY_RECEIVER) the probe emits a receiver cell at index 0 with the arguments following — so a stateful no-arg instance method (e.g. pop()) is still probed. The §5.3 result-into-assertion commit rule is a later iteration.

      Parameters:
      operationSymbol - the callable's symbol (carries the squirrelled scope signal + parameters)
      debugInfo - source location information
      scopeId - the scope the field-walk temps are borrowed in
      Returns:
      the field loads then the input-class probe, or empty when disabled / out of scope / no dimensions