Class DynamicClassDfnGenerator

All Implemented Interfaces:
BiFunction<AggregateWithTraitsSymbol, EK9Parser.DynamicClassDeclarationContext, IRConstruct>

Creates the appropriate IR Construct for a dynamic class declaration (anonymous inline class).

Dynamic classes are regular classes with captured variables from the enclosing scope. This generator extends AggregateDfnGenerator to reuse the full aggregate processing pipeline (fields, _c_init, _i_init, methods/operators, dispatch tables, coverage instrumentation) and then augments the capture constructor with STORE_FIELD instructions for each captured variable.

The capture constructor pattern matches DynamicFunctionDfnGenerator: the synthetic constructor from Phase 3 goes through processSyntheticConstructor() which generates call super → call _i_init → return this. This generator inserts STORE_FIELD + RETAIN for each captured parameter before the call to _i_init, so a property initialiser can read what the class captured. They were stored just before the RETURN, after the initialisers had run, so an initialiser reading a captured value read an unset field and failed with a NullPointerException (found fixing front-end audit FE32).