Class FieldSetStatusSymbolGenerator
_fieldSetStatus method SYMBOL on an aggregate, if not already present.
_fieldSetStatus is infrastructure used by many default operators (?, $, $$, #?, ==, <=>).
It is added to every concrete aggregate (records, classes, components, services and monomorphized
generics); it is not callable by EK9 developers. This factory only creates the method SYMBOL - the
method body IR is produced separately by FieldSetStatusGenerator.
Extracted so the single-threaded pre-pass in IRGenerator and the per-construct generators
(regular aggregates, services, parameterized wrappers) share ONE definition. Adding this symbol mutates
the aggregate's scope, so for top-level (cross-source referenceable) aggregates it MUST be done before
the multi-threaded IR generation reads aggregate scopes in parallel - otherwise a reader thread iterating
an aggregate's scope races the mutation, surfacing as a ConcurrentModificationException.
This honours the documented "symbols are read-only after phase 6" contract.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidensurePresent(AggregateSymbol aggregateSymbol, ISymbol bitsType) Ensure the_fieldSetStatusmethod symbol exists on the given aggregate.
-
Method Details
-
ensurePresent
Ensure the_fieldSetStatusmethod symbol exists on the given aggregate. Idempotent: a no-op if the aggregate already declares it, or if it is a (still-generic) template type.- Parameters:
aggregateSymbol- the aggregate to augment.bitsType- the resolvedorg.ek9.lang::Bitstype (the method's return type).
-