Class BeforeThreadsSafePoints

java.lang.Object
org.ek9lang.compiler.phase9.BeforeThreadsSafePoints
All Implemented Interfaces:
Function<List<IRInstr>, List<IRInstr>>, UnaryOperator<List<IRInstr>>

public final class BeforeThreadsSafePoints extends Object implements UnaryOperator<List<IRInstr>>
The SAFE_POINT before_threads of one instruction list (EK9_NATIVE_CYCLE_COLLECTOR_DESIGN.md ยง13.11, S0b): ahead of each call that starts runtime threads (StartsRuntimeThreads). Starting a thread puts back at rest every candidate another thread may come to reach (all but the [confined] ones), and nothing buffers a dead island again - so without a collection first, each start leaked the islands buffered since the last one (the truth-table review, 2026-11-02, H2). The point goes before the instructions that evaluate the call's receiver and arguments - the run immediately before the call that makes or owns a value the call uses, transitively - so no borrow of a field lives across it (V-I treats a safe point as a call). Used by SafePointPlacement through IRRewriter.rewriteLists; returns the same list when there is nothing to place. Stateless: hold one.