Class IsSetEvaluationCreator

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

public final class IsSetEvaluationCreator extends Object
Creates evaluation instructions for _isSet() method calls. Only creates the _isSet() call and result memory management. Caller is responsible for loading the operand if needed.

When the operand is a trait (interface), the isTraitCall flag must be set to true to generate correct INVOKEINTERFACE bytecode.

  • Constructor Details

  • Method Details

    • apply

      public List<IRInstr> apply(String operandVariable, String operandType, boolean isTraitCall, VariableDetails resultDetails)
      Creates _isSet() method call instructions.
      Parameters:
      operandVariable - The variable to call _isSet() on
      operandType - The type of the operand
      isTraitCall - True if the operand type is a trait (requires INVOKEINTERFACE)
      resultDetails - The result variable details
      Returns:
      List of IR instructions for the _isSet() call