Class AbstractIRHelper

java.lang.Object
org.ek9lang.compiler.phase7.helpers.AbstractIRHelper
Direct Known Subclasses:
ApplicationBindingIRHelper, AspectWeavingIRHelper, CallIRHelper, EnumerationIRHelper, ExpressionIRHelper, InjectionPointIRHelper, StatementIRHelper, SyntheticMethodIRHelper

public abstract class AbstractIRHelper extends Object
Abstract base class for all IR generation helpers.

Provides common infrastructure that all focused IR helpers need: access to the instruction builder which contains the IR generation context.

This base class follows the focused helper pattern where each concrete helper handles a single responsibility in IR generation.

  • Field Details

    • instructionBuilder

      protected final IRInstructionBuilder instructionBuilder
      The instruction builder for creating IR instructions with automatic context.
  • Constructor Details

    • AbstractIRHelper

      protected AbstractIRHelper(IRInstructionBuilder instructionBuilder)
      Create a new IR helper with the instruction builder. The builder contains the IRGenerationContext for scope and debug management.
      Parameters:
      instructionBuilder - The builder for creating IR instructions and accessing context
  • Method Details

    • getContext

      protected IRGenerationContext getContext()
      Get the IR generation context from the instruction builder. Convenience method for helpers that need direct context access.