Record Class ForRangePolymorphicInstr.EndCheck
java.lang.Object
java.lang.Record
org.ek9lang.compiler.ir.instructions.ForRangePolymorphicInstr.EndCheck
- Enclosing class:
ForRangePolymorphicInstr
public static record ForRangePolymorphicInstr.EndCheck(String primitive, DebugInfo debugInfo)
extends Record
Whether the counter has REACHED the end:
primitive is read after the body, and the loop stops BEFORE the
increment when it is true. It is computed at the TOP of the iteration by the loop_condition_template, from
the very counter <=> end the loop condition uses (one comparison per step, Contract 15) - there is no
evaluation of its own. The range never steps past its end, so the counter never takes a value after the end (a
constraint, or the type's maximum, need not hold one).
debugInfo is the for statement's position (null when debugging instrumentation is off): the end
test is on the for line, so a back end gives the read of primitive that line. With no line of its
own it would take the last body line's, and a debugger would leave the loop from the last pass's body instead of
stopping on the for line once more (Contract 15).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) StringasIrLine()Theend_primitiveline of the IR text, with theforstatement's position when there is one.Returns the value of thedebugInforecord 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 theprimitiverecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EndCheck
-
-
Method Details
-
asIrLine
String asIrLine()Theend_primitiveline of the IR text, with theforstatement's position when there is one. -
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). -
primitive
Returns the value of theprimitiverecord component.- Returns:
- the value of the
primitiverecord component
-
debugInfo
Returns the value of thedebugInforecord component.- Returns:
- the value of the
debugInforecord component
-