Class BranchInstrAsmGenerator

java.lang.Object
org.ek9lang.compiler.backend.jvm.AbstractAsmGenerator
org.ek9lang.compiler.backend.jvm.BranchInstrAsmGenerator
All Implemented Interfaces:
Consumer<BranchInstr>

public final class BranchInstrAsmGenerator extends AbstractAsmGenerator implements Consumer<BranchInstr>
Specialized ASM generator for BranchInstr processing. Handles RETURN, BRANCH, BRANCH_TRUE, BRANCH_FALSE, ASSERT operations using the actual BranchInstr methods (no string parsing).
  • Constructor Details

    • BranchInstrAsmGenerator

      public BranchInstrAsmGenerator(ConstructTargetTuple constructTargetTuple, OutputVisitor outputVisitor, org.objectweb.asm.ClassWriter classWriter)
  • Method Details

    • setConstructorMode

      public void setConstructorMode(boolean isConstructor)
      Set whether we're currently processing a constructor. Must be called before processing constructor instructions.
    • accept

      public void accept(BranchInstr branchInstr)
      Generate JVM bytecode for a branch instruction. Uses BranchInstr opcode to determine the specific operation.
      Specified by:
      accept in interface Consumer<BranchInstr>