Class ProfilingExitInstr

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

public final class ProfilingExitInstr extends IRInstr
Specialized IR instruction for profiling function exit (PROFILING_EXIT).

Profiling exit probes are inserted before function return when profiling is enabled. Each probe computes elapsed time and accumulates timing data.

The JVM backend wraps the method body in try/finally to ensure this fires even when exceptions occur.

  • Method Details

    • exit

      public static ProfilingExitInstr exit(long functionId, DebugInfo debugInfo)
      Create a profiling exit instruction.
      Parameters:
      functionId - Globally unique function ID (FNV-1a hash)
      debugInfo - Optional source location debug info
    • getFunctionId

      public long getFunctionId()
      Get the function ID for this probe.
    • 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