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. The probeId is globally unique (FNV-1a hash of module + file + line + type + function) so no separate moduleId is needed.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(INodeVisitor visitor) Get the full probe details for this instruction.longGet the probe ID (GUID).Get the probe type.booleanCheck if this is a branch probe (true or false).booleanCheck if this is a function entry probe.static CoverageProbeInstrprobe(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
Create a coverage probe instruction.- Parameters:
probeDetails- Full probe details for metadata and reportingdebugInfo- Optional source location debug info
-
getProbeDetails
Get the full probe details for this instruction. -
getProbeId
public long getProbeId()Get the probe ID (GUID). -
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
-