Class CoverageFinalizeInstr

java.lang.Object
org.ek9lang.compiler.ir.instructions.IRInstr
org.ek9lang.compiler.ir.instructions.CoverageFinalizeInstr
All Implemented Interfaces:
INode

public final class CoverageFinalizeInstr extends IRInstr
Specialized IR instruction for coverage finalization (COVERAGE_FINALIZE).

This instruction is emitted in the entry point's shutdown hook or finally block. It triggers the coverage runtime to:

  • Collect all probe data from registered modules
  • Serialize coverage counters to .ek9covcounter.json files
  • Optionally merge with existing coverage data
  • Method Details

    • finalize

      public static CoverageFinalizeInstr finalize(DebugInfo debugInfo)
      Create a coverage finalize instruction with default output path.
      Parameters:
      debugInfo - Optional source location debug info
    • finalize

      public static CoverageFinalizeInstr finalize(String outputPath, DebugInfo debugInfo)
      Create a coverage finalize instruction with explicit output path.
      Parameters:
      outputPath - Path to write coverage data (null for default .ek9/ directory)
      debugInfo - Optional source location debug info
    • getOutputPath

      public String getOutputPath()
      Get the output path for coverage data.
      Returns:
      The output path, or null for default
    • usesDefaultPath

      public boolean usesDefaultPath()
      Check if this instruction uses the default output path.
    • accept

      public void accept(INodeVisitor visitor)
      Specified by:
      accept in interface INode
      Overrides:
      accept in class IRInstr
    • toString

      public String toString()
      Overrides:
      toString in class IRInstr