Record Class ForRangePolymorphicInstr.AscendingCase
java.lang.Object
java.lang.Record
org.ek9lang.compiler.ir.instructions.ForRangePolymorphicInstr.AscendingCase
- Enclosing class:
ForRangePolymorphicInstr
public static record ForRangePolymorphicInstr.AscendingCase(List<IRInstr> directionCheck, String directionPrimitive, List<IRInstr> loopConditionTemplate, String loopConditionPrimitive, List<IRInstr> loopBodySetup, List<IRInstr> loopIncrement)
extends Record
Dispatch case for ascending loops (direction < 0).
Contains explicit IR for all loop operations.
Example: for i in 1 ... 10
- direction_check: IR for direction < 0
- loop_condition: IR for current <= end
- loop_increment: IR for current++
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedirectionCheckrecord component.Returns the value of thedirectionPrimitiverecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theloopBodySetuprecord component.Returns the value of theloopConditionPrimitiverecord component.Returns the value of theloopConditionTemplaterecord component.Returns the value of theloopIncrementrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AscendingCase
public AscendingCase(List<IRInstr> directionCheck, String directionPrimitive, List<IRInstr> loopConditionTemplate, String loopConditionPrimitive, List<IRInstr> loopBodySetup, List<IRInstr> loopIncrement) Creates an instance of aAscendingCaserecord class.- Parameters:
directionCheck- the value for thedirectionCheckrecord componentdirectionPrimitive- the value for thedirectionPrimitiverecord componentloopConditionTemplate- the value for theloopConditionTemplaterecord componentloopConditionPrimitive- the value for theloopConditionPrimitiverecord componentloopBodySetup- the value for theloopBodySetuprecord componentloopIncrement- the value for theloopIncrementrecord 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). -
directionCheck
-
directionPrimitive
Returns the value of thedirectionPrimitiverecord component.- Returns:
- the value of the
directionPrimitiverecord component
-
loopConditionTemplate
-
loopConditionPrimitive
Returns the value of theloopConditionPrimitiverecord component.- Returns:
- the value of the
loopConditionPrimitiverecord component
-
loopBodySetup
-
loopIncrement
-