Class CoverageProbeInstr
java.lang.Object
org.ek9lang.compiler.ir.instructions.IRInstr
org.ek9lang.compiler.ir.instructions.CoverageProbeInstr
- All Implemented Interfaces:
INode
Specialized IR instruction for coverage probe recording (COVERAGE_PROBE).
Coverage probes are inserted at control flow points during IR generation when coverage is enabled. Each probe records that a specific code path was executed.
The instruction carries full probe details for metadata generation and uses operands for human-readable IR output.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(INodeVisitor visitor) Get the full probe details for this instruction.intGet the probe ID.Get the probe type.booleanCheck if this is a branch probe (true or false).booleanCheck if this is a function entry probe.static CoverageProbeInstrprobe(long moduleId, int probeId, CoverageProbeType type, DebugInfo debugInfo) Create a simple coverage probe instruction with minimal details.static CoverageProbeInstrprobe(long moduleId, CoverageProbeDetails probeDetails, DebugInfo debugInfo) Create a coverage probe 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
-
probe
public static CoverageProbeInstr probe(long moduleId, CoverageProbeDetails probeDetails, DebugInfo debugInfo) Create a coverage probe instruction.- Parameters:
moduleId- The module ID containing this probeprobeDetails- Full probe details for metadata and reportingdebugInfo- Optional source location debug info
-
probe
public static CoverageProbeInstr probe(long moduleId, int probeId, CoverageProbeType type, DebugInfo debugInfo) Create a simple coverage probe instruction with minimal details.- Parameters:
moduleId- The module ID containing this probeprobeId- The unique probe ID within the moduletype- The type of control flow pointdebugInfo- Optional source location debug info
-
getProbeDetails
Get the full probe details for this instruction. -
getProbeId
public int getProbeId()Get the probe ID. -
getProbeType
Get the probe type. -
isFunctionEntry
public boolean isFunctionEntry()Check if this is a function entry probe. -
isBranchProbe
public boolean isBranchProbe()Check if this is a branch probe (true or false). -
accept
-
toString
-