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).
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractAsmGenerator
AbstractAsmGenerator.LocalVariableInfo, AbstractAsmGenerator.MethodContext, AbstractAsmGenerator.ScopeInfo, AbstractAsmGenerator.TempVariableSource
-
Field Summary
Fields inherited from class AbstractAsmGenerator
classWriter, constructTargetTuple, outputVisitor
-
Constructor Summary
ConstructorsConstructorDescriptionBranchInstrAsmGenerator
(ConstructTargetTuple constructTargetTuple, OutputVisitor outputVisitor, org.objectweb.asm.ClassWriter classWriter) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(BranchInstr branchInstr) Generate JVM bytecode for a branch instruction.void
setConstructorMode
(boolean isConstructor) Set whether we're currently processing a constructor.Methods inherited from class AbstractAsmGenerator
convertToJvmDescriptor, convertToJvmName, generateBooleanLiteral, generateCharacterLiteral, generateDebugInfo, generateFloatLiteral, generateIntegerLiteral, generateLoadVariable, generateLocalVariableTable, generateMethodDescriptor, generateObjectLiteral, generateStackOperation, generateStoreVariable, generateStringLiteral, getCurrentMethodVisitor, getMethodContext, getOrCreateLabel, getVariableIndex, isVariableAllocated, setCurrentMethodVisitor, setSharedMethodContext, trackTempVariableFromLiteral, trackTempVariableFromLoad
-
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
Generate JVM bytecode for a branch instruction. Uses BranchInstr opcode to determine the specific operation.- Specified by:
accept
in interfaceConsumer<BranchInstr>
-