Class LabelInstr

java.lang.Object
org.ek9lang.compiler.ir.IRInstr
org.ek9lang.compiler.ir.LabelInstr
All Implemented Interfaces:
INode

public final class LabelInstr extends IRInstr
Specialized IR instruction for control flow labels (LABEL).

Label instructions mark specific instruction positions as branch targets for control flow operations like BRANCH_TRUE, BRANCH_FALSE, and BRANCH.

  • Method Details

    • label

      public static LabelInstr label(String labelName)
      Create label instruction: LABEL label_name.
    • label

      public static LabelInstr label(String labelName, DebugInfo debugInfo)
      Create label instruction with debug info: LABEL label_name.
    • addOperand

      public LabelInstr addOperand(String operand)
      Description copied from class: IRInstr
      Add operand to this instruction.
      Overrides:
      addOperand in class IRInstr
    • getLabelName

      public String getLabelName()
      Get the label name for this label instruction.
    • toString

      public String toString()
      Overrides:
      toString in class IRInstr