Package org.ek9lang.compiler.backend
package org.ek9lang.compiler.backend
Backend Code Generation - Target-specific code generation infrastructure.
This package defines the abstraction layer for code generation backends. EK9 supports multiple target architectures through a common IR representation that is then translated to target-specific code.
Dual-Backend Architecture:
- JVM Backend - Java bytecode generation for enterprise compatibility
(
org.ek9lang.compiler.backend.jvm) - LLVM Backend - Native compilation for performance-critical systems (separate development branch)
Key Abstractions:
Target- Target architecture specificationOutputVisitorLocator- Locates appropriate output visitor for target
The backend processes IR generated in Phase 10 and produces target-specific output during Phases 13-15 (CODE_GENERATION_PREPARATION, CODE_GENERATION_AGGREGATES, CODE_GENERATION_CONSTANTS).
-
ClassDescriptionA given construct from a specific source should be output to the targetFile.Interface for main entry point visitors that generate target-specific main entry points for EK9 programs (e.g., main methods for JVM, main functions for native binaries).Contains all the information needed for target-specific visitors to generate main entry points.Locates the appropriate main entry visitor for the appropriate target architecture.Given a TargetArchitecture from the configFlags, this function will provide a function that creates (if not present) and returns the File for a Construct.Locates the appropriate IR node visitor for the appropriate target architecture.The target platform/technology for the compiler output.Given a TargetArchitecture, this function will provide the Target for it.