Class LabelInstrAsmGenerator
java.lang.Object
org.ek9lang.compiler.backend.jvm.AbstractAsmGenerator
org.ek9lang.compiler.backend.jvm.LabelInstrAsmGenerator
- All Implemented Interfaces:
Consumer<LabelInstr>
public final class LabelInstrAsmGenerator
extends AbstractAsmGenerator
implements Consumer<LabelInstr>
Specialized ASM generator for LabelInstr processing.
Handles LABEL operations - marks instruction positions as branch targets
for control flow operations like BRANCH_TRUE, BRANCH_FALSE, and BRANCH.
-
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
ConstructorsConstructorDescriptionLabelInstrAsmGenerator
(ConstructTargetTuple constructTargetTuple, OutputVisitor outputVisitor, org.objectweb.asm.ClassWriter classWriter) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(LabelInstr labelInstr) Generate JVM label placement for a label instruction.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
-
LabelInstrAsmGenerator
public LabelInstrAsmGenerator(ConstructTargetTuple constructTargetTuple, OutputVisitor outputVisitor, org.objectweb.asm.ClassWriter classWriter)
-
-
Method Details
-
accept
Generate JVM label placement for a label instruction. Uses the label cache in MethodContext to ensure the same JVM Label object is used for both label definition and branch targets.- Specified by:
accept
in interfaceConsumer<LabelInstr>
-