Class CoverageRegisterInstr
java.lang.Object
org.ek9lang.compiler.ir.instructions.IRInstr
org.ek9lang.compiler.ir.instructions.CoverageRegisterInstr
- All Implemented Interfaces:
INode
Specialized IR instruction for coverage module registration (COVERAGE_REGISTER).
This instruction is emitted in the static initializer of each covered class. It registers the module's coverage metadata with the runtime so that:
- Probe arrays are allocated
- Module metadata is recorded for reporting
- Coverage data can be aggregated across modules
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(INodeVisitor visitor) Get the full module details for this instruction.longGet the module ID.Get the module name.intGet the total probe count for this module.static CoverageRegisterInstrCreate a coverage register instruction with minimal details.static CoverageRegisterInstrregister(CoverageModuleDetails moduleDetails, DebugInfo debugInfo) Create a coverage register instruction.toString()Methods inherited from class IRInstr
addOperand, addOperands, equals, getDebugInfo, getEscapeMetaData, getOpcode, getOperands, getResult, hasEscapeMetaData, hashCode, hasResult, isControlFlow, isLabel, isMemoryManagement, isMethodCall, setEscapeMetaData
-
Method Details
-
register
public static CoverageRegisterInstr register(CoverageModuleDetails moduleDetails, DebugInfo debugInfo) Create a coverage register instruction.- Parameters:
moduleDetails- Full module coverage metadatadebugInfo- Optional source location debug info
-
register
public static CoverageRegisterInstr register(long moduleId, String moduleName, int probeCount, DebugInfo debugInfo) Create a coverage register instruction with minimal details.- Parameters:
moduleId- The module IDmoduleName- The module nameprobeCount- The total number of probes in this moduledebugInfo- Optional source location debug info
-
getModuleDetails
Get the full module details for this instruction. -
getModuleId
public long getModuleId()Get the module ID. -
getModuleName
Get the module name. -
getProbeCount
public int getProbeCount()Get the total probe count for this module. -
accept
-
toString
-