Class PublishedValues
java.lang.Object
org.ek9lang.compiler.phase9.PublishedValues
THE rule of which values an instruction publishes (EK9_NATIVE_CYCLE_COLLECTOR_DESIGN.md ยง13.11, S2 and S2b) - what
PublishPlacement places and PublishVerifier (V-P) demands exactly:
- a
STATIC_FIELD_ASSIGNinto_Application- an application's_preparestoring a registration runtime threads can reach, a[registered]type (REGISTRY; S2c - one only the program's own thread uses stays mortal); any other static store - an enumeration's values, a cycle-guard owner, all in a_c_init(CONSTANT); - a call that hands values to runtime threads (
HandsValuesToRuntimeThreads, HANDLER); - the store barrier (STORE, naming the holder the value goes into): a
FIELD_ASSIGNinto a field declared by a type a published value may reach, or aSLOT_ASSIGN this.<property>in an operation of a[registered]construct - except intothiswhile it is being constructed (a constructor,_i_init,_c_init: E08250 keepsthisfrom escaping, so nothing published holds it yet); and an argument a call may KEEP in its receiver or in another argument (KeptArgumentHolders, from the callee's RETAINS) when that holder's type is one a published value may reach -items += lineon a registered component's List (review 2026-11-02, M2) - as well as the operand of a:=:,:~:or:^:into such a receiver, which shares the operand's contents.
[registered] fact by name, failing closed: a type the program
does not know to be unreached is reached. A store barrier is conditional on its holder at run time (N2), so an
over-approximation here costs a compare, never a leak.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final recordWhere an instruction is: in an operation of a registered construct or not, and while its object is still being constructed or not (a constructor,_i_init,_c_init). -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final StringThe owner of every registration static an application's_preparefills. -
Constructor Summary
ConstructorsConstructorDescriptionPublishedValues(Predicate<String> mayBeRegistered, Function<CallInstr, Optional<ScopedSymbol>> calleeOf) -
Method Summary
Modifier and TypeMethodDescription(package private) Optional<ScopedSymbol> The symbol a call runs, when its names lead to one.(package private) booleanmayBeRegistered(String typeName) True for a type a published value may reach, by fully qualified name - failing closed.(package private) PublishedValues.Whereof(IRConstruct construct, OperationInstr operation) Where the instructions of this operation of this construct are.(package private) List<PublishInstr> of(IRInstr instruction, PublishedValues.Where where) ThePUBLISHes that must come immediately before this instruction, in order; empty for most.
-
Field Details
-
APPLICATION
The owner of every registration static an application's_preparefills.- See Also:
-
-
Constructor Details
-
PublishedValues
public PublishedValues(Predicate<String> mayBeRegistered, Function<CallInstr, Optional<ScopedSymbol>> calleeOf) - Parameters:
mayBeRegistered- true for a type a published value may reach, by fully qualified name - fail closed.calleeOf- the symbol a call runs, when its names lead to one (CalleeOfCall).
-
-
Method Details
-
mayBeRegistered
True for a type a published value may reach, by fully qualified name - failing closed. -
calleeOf
The symbol a call runs, when its names lead to one. -
of
Where the instructions of this operation of this construct are. -
of
ThePUBLISHes that must come immediately before this instruction, in order; empty for most.
-