Class BranchInstrAsmGenerator
java.lang.Object
org.ek9lang.compiler.backend.jvm.AbstractAsmGenerator
org.ek9lang.compiler.backend.jvm.BranchInstrAsmGenerator
- All Implemented Interfaces:
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 TypeMethodDescriptionvoidaccept(BranchInstr branchInstr) Generate JVM bytecode for a branch instruction.voidsetConstructorMode(boolean isConstructor) Set whether we're currently processing a constructor.Methods inherited from class AbstractAsmGenerator
convertToJvmDescriptor, convertToJvmName, extractFieldName, generateBooleanLiteral, generateCharacterLiteral, generateDebugInfo, generateFloatLiteral, generateIntegerLiteral, generateLoadVariable, generateLocalVariableTable, generateMethodDescriptor, generateObjectLiteral, generateStackOperation, generateStoreVariable, generateStringLiteral, getCurrentMethodVisitor, getFieldDescriptor, getMethodContext, getOrCreateLabel, getOwnerClassName, getVariableIndex, isFieldAccess, isVariableAllocated, setCurrentMethodVisitor, setSharedMethodContext, trackTempVariableFromLiteral, trackTempVariableFromLoad
-
Constructor Details
-
BranchInstrAsmGenerator
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:
acceptin interfaceConsumer<BranchInstr>
-