Class BooleanOperatorCallDetails

java.lang.Object
org.ek9lang.compiler.phase7.calls.BooleanOperatorCallDetails

public final class BooleanOperatorCallDetails extends Object
THE IR CallDetails for the non-virtual EK9 Boolean logical operators that the lowering synthesises - _and, _or and ~. Reuse this; do not hand-build the descriptor inline.

This exists because the descriptor kept being re-derived per path. _and was hand-built identically in the short-circuit, stream-filter and guard-condition paths (which is why a shared _and helper was extracted), while its sibling _or stayed inline in the short-circuit and switch-case-chain paths, and ~ lived in a third class. That asymmetry is the same failure mode that made _ofTrue and _ofFalse render with opposite purity - a shared helper for one branch and none for its sibling. All three now come from here, so they cannot drift apart.

The Boolean type is taken as the SYMBOL cached in Ek9Types, so the target type name and the call metadata are both derived from it rather than from a hard-coded FQN String and a fabricated tuple. (The constrained-type constraint chaining builds a _and/_or carrying a virtual flag - a genuinely different descriptor - and stays inline in ConstrainedTypeDfnGenerator.)

  • Constructor Details

    • BooleanOperatorCallDetails

      public BooleanOperatorCallDetails(IRGenerationContext stackContext)
  • Method Details

    • and

      public CallDetails and(String lhsTemp, String rhsTemp)
      lhs._and(rhs) returning a Boolean.
      Parameters:
      lhsTemp - the IR temp holding the left Boolean operand (the call receiver)
      rhsTemp - the IR temp holding the right Boolean operand (the argument)
    • or

      public CallDetails or(String lhsTemp, String rhsTemp)
      lhs._or(rhs) returning a Boolean.
      Parameters:
      lhsTemp - the IR temp holding the left Boolean operand (the call receiver)
      rhsTemp - the IR temp holding the right Boolean operand (the argument)
    • not

      public CallDetails not(String operandTemp)
      The unary ~ on a Boolean, returning the inverted Boolean.
      Parameters:
      operandTemp - the IR temp holding the Boolean to invert