Record Class LoopContextData

java.lang.Object
java.lang.Record
org.ek9lang.compiler.backend.jvm.LoopContextData

public record LoopContextData(org.objectweb.asm.Label continueLabel, org.objectweb.asm.Label exitLabel) extends Record
Loop-specific context data for bytecode generation. Stored in BytecodeStackFrame when frameType is LOOP.

EK9 loops have no break/continue statements - they execute to completion. This context provides labels for:

  • Next iteration (continueLabel) - where nested control flow jumps after completion
  • Natural loop exit (exitLabel) - where loop exits when condition fails
  • Constructor Summary

    Constructors
    Constructor
    Description
    LoopContextData(org.objectweb.asm.Label continueLabel, org.objectweb.asm.Label exitLabel)
    Creates an instance of a LoopContextData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.objectweb.asm.Label
    Returns the value of the continueLabel record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    org.objectweb.asm.Label
    Returns the value of the exitLabel record component.
    final int
    Returns a hash code value for this object.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LoopContextData

      public LoopContextData(org.objectweb.asm.Label continueLabel, org.objectweb.asm.Label exitLabel)
      Creates an instance of a LoopContextData record class.
      Parameters:
      continueLabel - the value for the continueLabel record component
      exitLabel - the value for the exitLabel record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • continueLabel

      public org.objectweb.asm.Label continueLabel()
      Returns the value of the continueLabel record component.
      Returns:
      the value of the continueLabel record component
    • exitLabel

      public org.objectweb.asm.Label exitLabel()
      Returns the value of the exitLabel record component.
      Returns:
      the value of the exitLabel record component