Class InputClassProbeInstr
- All Implemented Interfaces:
INode
Inserted at a public construct's entry when input-variety measurement is enabled (which rides the
coverage-instrumented -t run). Unlike CoverageProbeInstr / ProfilingEntryInstr
— which push only a long id — this probe carries the construct's fully-qualified name plus
each argument's local-variable name, so the backend can load the live argument objects and pass
them to the runtime classifier. Each value is then placed into its ValueClassId leaf cell
for the dynamic numerator (design EK9_INPUT_VARIATION_METRIC_DESIGN.md §5).
Measurement-only: emits no gate/error. The receiver rides as implicit p0 and a record contributes
one dimension per field leaf (§4.5) — but the decomposition is emitted as ordinary
LOAD_FIELD instructions before this probe, so every dimension here is simply a named local
and no backend needs record-specific handling.
The same opcode also carries the §5.3 assert window markers, emitted around an assert statement's condition evaluation so a probe firing inside it commits an asserted cell as well as a driven one. They ride here rather than as their own opcode deliberately: one IR concept for the whole input-variety feature means one place per backend to implement, and a marker carries no payload to decode — it selects a no-arg runtime entry point.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhat this instruction is: an entry probe, or one edge of a §5.3 assert window. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(INodeVisitor visitor) static InputClassProbeInstrassertWindowEnter(DebugInfo debugInfo) Open the §5.3 assert window — emitted immediately before an assert condition is evaluated.static InputClassProbeInstrassertWindowExit(DebugInfo debugInfo) Close the §5.3 assert window opened byassertWindowEnter(DebugInfo).getArgs()getKind()static InputClassProbeInstrprobe(String constructFullyQualifiedName, String constructName, List<InputClassProbeArg> args, DebugInfo debugInfo) Create an input-class 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 InputClassProbeInstr probe(String constructFullyQualifiedName, String constructName, List<InputClassProbeArg> args, DebugInfo debugInfo) Create an input-class probe instruction.- Parameters:
constructFullyQualifiedName- the callable's FQN (join key with the static denominator)constructName- human-readable display nameargs- the argument dimensions to classify at entrydebugInfo- optional source location debug info
-
assertWindowEnter
Open the §5.3 assert window — emitted immediately before an assert condition is evaluated. -
assertWindowExit
Close the §5.3 assert window opened byassertWindowEnter(DebugInfo). -
getKind
-
getConstructFullyQualifiedName
-
getConstructName
-
getArgs
-
accept
-
toString
-