Class AggregateDfnGenerator

java.lang.Object
org.ek9lang.compiler.phase7.AbstractDfnGenerator
org.ek9lang.compiler.phase7.AggregateDfnGenerator
Direct Known Subclasses:
ClassDfnGenerator, ComponentDfnGenerator, DynamicClassDfnGenerator, RecordDfnGenerator, TraitDfnGenerator

abstract class AggregateDfnGenerator extends AbstractDfnGenerator
Common code of Aggregate Construct types.
  • Constructor Details

  • Method Details

    • processAggregate

      protected IRConstruct processAggregate(AggregateSymbol aggregateSymbol, EK9Parser.AggregatePartsContext ctx)
    • createFieldDeclarations

      protected void createFieldDeclarations(IRConstruct construct, AggregateSymbol aggregateSymbol)
      Create field declarations using AggregateSymbol.getProperties(). This provides structural metadata about the class's data members, separate from the behavioral operations (methods).
    • createInitializationOperations

      protected void createInitializationOperations(IRConstruct construct, AggregateSymbol aggregateSymbol, EK9Parser.AggregatePartsContext ctx)
      Create the three-phase initialization operations for the class: 1. c_init - Class/static initialization 2. i_init - Instance initialization (property declarations and immediate initialization) 3. Constructor methods will be processed separately in createOperationsForAggregateParts
    • createOperationsForAggregateParts

      protected void createOperationsForAggregateParts(IRConstruct construct, AggregateSymbol aggregateSymbol, EK9Parser.AggregatePartsContext ctx)
    • withFieldSetStatusCarrier

      protected List<MethodSymbol> withFieldSetStatusCarrier(AggregateSymbol aggregateSymbol)
      The aggregate's own methods, plus the synthetic _fieldSetStatus carrier if it needs one.

      The carrier is detached - created for this construct's operations list and never defined into the aggregate's scope. That is what removes the shared-model mutation during the parallel IR phase, and with it the single-threaded pre-pass that existed to stop it racing (F37). It is appended last, which is exactly where define() used to put it, so the emitted operation order is unchanged.

      The method returns a Bits value where each bit represents a field's set status. Using Bits instead of Integer removes the 32-field limit.