Record Class ConditionEvaluation
java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase7.generator.ConditionEvaluation
- Record Components:
instructions- The IR instructions that evaluate the condition (includes LOGICAL_AND_BLOCK for guards, or simple expression evaluation, or QUESTION_OPERATOR)primitiveCondition- The name of the primitive boolean variable (e.g., "_temp11") that contains the final boolean result for backend branching
public record ConditionEvaluation(List<IRInstr> instructions, String primitiveCondition)
extends Record
Result of evaluating a condition expression (with optional guard variables).
Contains both the IR instructions for evaluating the condition and the name of the primitive boolean variable that the backend can use for branching instructions (IFEQ, IFNE, etc.).
This is returned by GuardedConditionEvaluator after processing
any of the 4 condition/guard combinations.
-
Constructor Summary
ConstructorsConstructorDescriptionConditionEvaluation(List<IRInstr> instructions, String primitiveCondition) Creates an instance of aConditionEvaluationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinstructionsrecord component.Returns the value of theprimitiveConditionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConditionEvaluation
Creates an instance of aConditionEvaluationrecord class.- Parameters:
instructions- the value for theinstructionsrecord componentprimitiveCondition- the value for theprimitiveConditionrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
instructions
Returns the value of theinstructionsrecord component.- Returns:
- the value of the
instructionsrecord component
-
primitiveCondition
Returns the value of theprimitiveConditionrecord component.- Returns:
- the value of the
primitiveConditionrecord component
-