Class AssertThrowsAsmGenerator
java.lang.Object
org.ek9lang.compiler.backend.jvm.AbstractAsmGenerator
org.ek9lang.compiler.backend.jvm.AssertThrowsAsmGenerator
- All Implemented Interfaces:
Consumer<AssertThrowsInstr>
final class AssertThrowsAsmGenerator
extends AbstractAsmGenerator
implements Consumer<AssertThrowsInstr>
Specialized ASM generator for AssertThrowsInstr processing.
Handles ASSERT_THROWS and ASSERT_DOES_NOT_THROW operations.
These are test-only constructs that wrap expressions in try-catch blocks:
- ASSERT_THROWS: Expects a specific exception type, stores caught exception to result
- ASSERT_DOES_NOT_THROW: Expects no exception to be thrown
-
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
ConstructorsConstructorDescriptionAssertThrowsAsmGenerator(ConstructTargetTuple constructTargetTuple, OutputVisitor outputVisitor, org.objectweb.asm.ClassWriter classWriter) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(AssertThrowsInstr assertThrowsInstr) Generate JVM bytecode for assert throws instruction.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, isVariableFieldAccess, setCurrentMethodVisitor, setSharedMethodContext, trackTempVariableFromLiteral, trackTempVariableFromLoad
-
Constructor Details
-
AssertThrowsAsmGenerator
AssertThrowsAsmGenerator(ConstructTargetTuple constructTargetTuple, OutputVisitor outputVisitor, org.objectweb.asm.ClassWriter classWriter)
-
-
Method Details
-
accept
Generate JVM bytecode for assert throws instruction.- Specified by:
acceptin interfaceConsumer<AssertThrowsInstr>
-