Class FieldSetStatusSymbolGenerator
_fieldSetStatus method symbol used as an IR carrier.
_fieldSetStatus is infrastructure behind several default operators (?, $, $$, #?, ==,
<=>). It is not an EK9 method name: no programmer writes it and it cannot be called from
EK9 source. It belongs to the same layer as _lt and _eq - how an operator is
emitted - not to the symbol table, which holds what the programmer wrote (F37).
The symbol is DETACHED and must stay that way. It is returned to the caller and never
define()d into the aggregate's scope. Defining it there cost, in order: 448 mutations of
the shared model after the point at which the model is supposed to be complete; an entire
single-threaded lock-held pre-pass in IRGenerator invented to stop those mutations racing
the parallel IR generation that reads aggregate scopes; and a documented incompleteness in that
pre-pass, which covered only module-scope aggregates. All three were consequences of putting a
backend name in the symbol table, and all three go away by not doing that.
The method body IR is produced separately by FieldSetStatusGenerator; this only makes
the carrier the operations loop needs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Set<SymbolGenus> Construct genuses whose IR generators emit_fieldSetStatus. -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<MethodSymbol> createFor(AggregateSymbol aggregateSymbol, ISymbol bitsType) Create the detached_fieldSetStatuscarrier for this aggregate, if it should have one.
-
Field Details
-
FIELD_SET_STATUS_GENUSES
Construct genuses whose IR generators emit_fieldSetStatus.THE definition of which aggregates have one. It lives here rather than in
IRGeneratorbecause whether a type has this method is now derived from its genus rather than discovered by resolving a symbol - which is what lets a generator decide for a type in another source without reading, or writing, that type's scope.
-
-
Method Details
-
createFor
Create the detached_fieldSetStatuscarrier for this aggregate, if it should have one.- Parameters:
aggregateSymbol- the aggregate being generated.bitsType- the resolvedorg.ek9.lang::Bitstype (the method's return type).- Returns:
- the carrier, or empty for a still-generic template or an aggregate that already declares the method in source.
-