Class PublishVerifier

java.lang.Object
org.ek9lang.compiler.phase9.PublishVerifier
All Implemented Interfaces:
Function<IRConstruct, List<String>>

public final class PublishVerifier extends Object implements Function<IRConstruct, List<String>>
V-P (EK9_NATIVE_CYCLE_COLLECTOR_DESIGN.md ยง13.11, S2 and S2b), two checks over every operation:
  1. exact: each instruction is immediately preceded by exactly the PUBLISHes PublishedValues says, in order, holders included; and every PUBLISH is one of those. It catches a pass that drops, moves or invents one - a stray PUBLISH makes a value immortal that nothing shares;
  2. audit: every reference an instruction stores into an object a published one may reach (ReferenceEdges, classified by opcode, apart from the placement rule) is published immediately before. It catches a missing RULE - a way to make a published object reach an unpublished one that PublishedValues does not know (review 2026-11-02, M4: the exact check alone is the rule checking itself). A primitive (LOAD_PRIMITIVE) is no reference.
Run after PublishPlacement, beside V-S and V-I; a finding is a compiler defect.