Class CompilerMadeMembers

java.lang.Object
org.ek9lang.compiler.support.CompilerMadeMembers
All Implemented Interfaces:
Consumer<AggregateSymbol>

public final class CompilerMadeMembers extends Object implements Consumer<AggregateSymbol>
THE marking of a type whose every member the COMPILER writes - an enumeration and a constrained (or alias) type: each member is synthetic and has a source token, set by the front end where the members are made. Use it at the end of every step that adds members to such a type; never mark them anywhere else.

Neither type has a member a developer wrote: an enumeration's operators come from OperatorFactory (SYMBOL_DEFINITION), its constructors from ProcessTypeDeclarationOrError (EXPLICIT_TYPE_SYMBOL_DEFINITION) and its iterator() from EnumeratedTypeOrError (FULL_RESOLUTION); a constrained type's constructors come from ProcessTypeDeclarationOrError and its forwarded methods, operators and of from PopulateConstrainedTypeOrError (TYPE_HIERARCHY_CHECKS).

The rule this keeps (DFN-12, Steve 2026-10-28): phase 7 reads symbols; the front end owns them. IR generation used to set these two things itself, and the live workspace runs IR generation on the SAME symbols for a flow query (OnDemandIRGenerator) - so every enquiry that reads isSynthetic() or a member's line (call graph, unused code, MemberBySymbol) answered one way before the first flow query and another way after it. IrGenerationLeavesFrontEndSymbolsUnchangedTest pins the rule.

A member that already has a token keeps it: a constrained type's forwarded member is a clone of its base's and keeps the base's token. One without (the operators and constructors made here) takes the type's own token, the only source there is for code the developer never wrote. Idempotent.

  • Constructor Details

    • CompilerMadeMembers

      public CompilerMadeMembers()
  • Method Details