Class ProgramEntryPointInstr

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

public final class ProgramEntryPointInstr extends IRInstr
IR instruction containing all discovered programs and their metadata.

Used by backends to generate main() entry point and program selection logic. Processed once per compilation - backends should skip duplicate occurrences.

Contains complete program registry including: - Qualified program names - Parameter signatures with types - Application associations for dependency injection

  • Constructor Details

    • ProgramEntryPointInstr

      public ProgramEntryPointInstr(List<ProgramDetails> availablePrograms, DebugInfo debugInfo)
      Create program entry point instruction with complete program metadata.
      Parameters:
      availablePrograms - Complete list of all programs discovered during compilation
      debugInfo - Debug information for source mapping
  • Method Details

    • getAvailablePrograms

      public List<ProgramDetails> getAvailablePrograms()
      Get the complete list of available programs.
      Returns:
      Immutable list of program details
    • hasApplications

      public boolean hasApplications()
      Check if any programs have associated applications.
      Returns:
      true if at least one program has an application
    • 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