Class SyntheticMethodIRHelper

java.lang.Object
org.ek9lang.compiler.phase7.helpers.AbstractIRHelper
org.ek9lang.compiler.phase7.helpers.SyntheticMethodIRHelper

public class SyntheticMethodIRHelper extends AbstractIRHelper
Handles IR generation for synthetic methods (default operators).

This helper generates IR for all 11 default operators that EK9 supports using a map-based dispatch pattern. It leverages existing markers from earlier phases (isSynthetic() and DEFAULTED squirrel data) to identify which operators need synthesis.

Uses the stack-based IRGenerationContext to eliminate parameter threading and provide consistent scope/debug/memory management.

  • Constructor Details

    • SyntheticMethodIRHelper

      public SyntheticMethodIRHelper(IRInstructionBuilder instructionBuilder)
      Create the synthetic method IR helper.
  • Method Details

    • generateFor

      public void generateFor(ISymbol symbol)
      Generate IR for all synthetic methods in the given symbol.